
:root {

    --bg: #0b0f19;

    --card: #131b2e;

    --card-light: #1c263f;

    --primary: #3b82f6;

    --primary-hover: #2563eb;

    --accent: #60a5fa;

    --success: #10b981;

    --warning: #f59e0b;

    --danger: #ef4444;

    --text: #f1f5f9;

    --muted: #94a3b8;

    --border: #263352;

}



* {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;

}



body {

    background-color: var(--bg);

    color: var(--text);

    min-height: 100vh;

    display: flex;

    justify-content: center;

    padding: 20px 15px;

}



.container {

    width: 100%;

    max-width: 580px;

}



header {

    text-align: center;

    margin-bottom: 24px;

}



header h1 {

    font-size: 2.4rem;

    letter-spacing: -1px;

}



.accent {

    color: var(--primary);

}



.subtitle {

    color: var(--muted);

    font-size: 0.95rem;

    margin-top: 4px;

}



.card {

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 24px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);

}



.hidden {

    display: none !important;

}



/* TABS */

.tabs {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;

    background: var(--bg);

    padding: 6px;

    border-radius: 12px;

    margin-bottom: 18px;

    border: 1px solid var(--border);

}



.tab-btn {

    padding: 10px;

    border: none;

    border-radius: 8px;

    background: transparent;

    color: var(--muted);

    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s;

}



.tab-btn.active {

    background: var(--primary);

    color: white;

}



.multi-box {

    background: var(--bg);

    padding: 16px;

    border-radius: 12px;

    border: 1px solid var(--border);

}



.multi-box h3 {

    font-size: 1rem;

    margin-bottom: 12px;

    color: var(--accent);

}



.divider {

    text-align: center;

    color: var(--muted);

    font-size: 0.8rem;

    font-weight: 700;

    margin: 12px 0;

}



.form-group {

    margin-bottom: 16px;

}



label {

    display: block;

    font-size: 0.85rem;

    color: var(--muted);

    margin-bottom: 6px;

    font-weight: 600;

}



input, select {

    width: 100%;

    padding: 12px 14px;

    background: var(--bg);

    border: 1px solid var(--border);

    border-radius: 10px;

    color: var(--text);

    font-size: 1rem;

    outline: none;

    transition: border-color 0.2s;

}



input:focus, select:focus {

    border-color: var(--primary);

}



.btn {

    width: 100%;

    padding: 14px;

    border: none;

    border-radius: 10px;

    font-size: 1rem;

    font-weight: 700;

    cursor: pointer;

    transition: transform 0.1s, background 0.2s;

}



.btn:active {

    transform: scale(0.98);

}



.btn-primary {

    background: var(--primary);

    color: white;

}



.btn-primary:hover {

    background: var(--primary-hover);

}



.btn-secondary {

    background: var(--card-light);

    color: var(--text);

    border: 1px solid var(--border);

    width: auto;

    padding: 12px 18px;

}



/* LOBBY */

.lobby-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 16px;

}



.room-code-display {

    font-size: 1.2rem;

    background: var(--bg);

    padding: 6px 14px;

    border-radius: 10px;

    border: 1px solid var(--primary);

}



.room-code-display strong {

    color: var(--accent);

    letter-spacing: 2px;

}



/* LEADERBOARD */

.leaderboard {

    margin-top: 28px;

    padding-top: 20px;

    border-top: 1px solid var(--border);

}



.leaderboard h2 {

    font-size: 1.1rem;

    margin-bottom: 12px;

}



.lb-row {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 8px 12px;

    background: var(--bg);

    border-radius: 8px;

    margin-bottom: 6px;

    font-size: 0.9rem;

}



.lb-rank {

    font-weight: bold;

    color: var(--accent);

    width: 28px;

}



.lb-name {

    flex: 1;

    font-weight: 600;

}



.lb-cat {

    color: var(--muted);

    font-size: 0.78rem;

    margin-right: 12px;

}



.lb-score {

    font-weight: 700;

    color: var(--success);

}



/* GAME SCREEN */

.game-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 8px;

    margin-bottom: 12px;

}



.badge {

    background: var(--bg);

    padding: 6px 12px;

    border-radius: 20px;

    font-size: 0.85rem;

    border: 1px solid var(--border);

}



.timer-badge {

    border-color: var(--warning);

    color: var(--warning);

}



.score-badge strong {

    color: var(--accent);

}



.progress-bar {

    height: 6px;

    background: var(--bg);

    border-radius: 4px;

    overflow: hidden;

    margin-bottom: 24px;

}



.progress-fill {

    height: 100%;

    background: var(--primary);

    width: 10%;

    transition: width 0.3s ease;

}



.item-display {

    text-align: center;

    margin-bottom: 24px;

}



.item-visual {

    font-size: 4rem;

    background: var(--bg);

    width: 110px;

    height: 110px;

    line-height: 110px;

    border-radius: 20px;

    margin: 0 auto 16px;

    border: 1px solid var(--border);

}



.item-visual img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    border-radius: 20px;

}



.item-display h2 {

    font-size: 1.35rem;

    margin-bottom: 6px;

}



.item-subtitle {

    color: var(--muted);

    font-size: 0.9rem;

}



.input-wrapper {

    position: relative;

    margin-bottom: 14px;

}



.input-wrapper input {

    font-size: 1.4rem;

    font-weight: 700;

    text-align: center;

    padding: 12px 75px;

}



.unit-label {

    position: absolute;

    right: 16px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--accent);

    font-weight: 700;

    font-size: 0.95rem;

}



/* RESULT BOX */

.result-box {

    background: var(--bg);

    border-radius: 12px;

    padding: 18px;

    text-align: center;

    border: 1px solid var(--border);

}



.result-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-bottom: 14px;

}



.res-col {

    background: var(--card);

    padding: 12px;

    border-radius: 10px;

}



.res-col.highlight {

    border: 1px solid var(--primary);

}



.res-label {

    display: block;

    font-size: 0.78rem;

    color: var(--muted);

    margin-bottom: 4px;

}



.res-val {

    font-size: 1.25rem;

}



.points-earned {

    font-size: 1.4rem;

    font-weight: 800;

    color: var(--success);

    margin-bottom: 8px;

}



.accuracy-tag {

    font-size: 0.85rem;

    color: var(--muted);

    font-weight: normal;

}



.item-info {

    font-size: 0.85rem;

    color: var(--muted);

    margin-bottom: 16px;

    font-style: italic;

}



.multi-board {

    margin: 14px 0;

    text-align: left;

}



.banner {

    background: rgba(59, 130, 246, 0.15);

    border: 1px solid var(--primary);

    padding: 12px;

    border-radius: 10px;

    margin-bottom: 18px;

    font-size: 0.9rem;

    text-align: center;

}



.duel-compare {

    background: var(--card-light);

    padding: 8px;

    border-radius: 8px;

    font-size: 0.85rem;

    margin-bottom: 12px;

}



.duel-share-box {

    background: var(--bg);

    padding: 16px;

    border-radius: 12px;

    margin: 16px 0;

    border: 1px dashed var(--primary);

}



.duel-share-box h3 {

    font-size: 1rem;

    margin-bottom: 4px;

}



.duel-share-box p {

    font-size: 0.85rem;

    color: var(--muted);

    margin-bottom: 10px;

}



.share-row {

    display: flex;

    gap: 8px;

}



.final-score-box {

    text-align: center;

    background: var(--bg);

    padding: 20px;

    border-radius: 12px;

    margin: 16px 0;

}



.final-number {

    font-size: 3rem;

    font-weight: 800;

    color: var(--accent);

}



.summary-list {

    margin: 12px 0 20px;

    max-height: 240px;

    overflow-y: auto;

}



.sum-item {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 8px 12px;

    background: var(--card-light);

    border-radius: 8px;

    margin-bottom: 6px;

    font-size: 0.85rem;

}



footer {

    text-align: center;

    margin-top: 20px;

    font-size: 0.85rem;

    color: var(--muted);

}



footer a {

    color: var(--accent);

    text-decoration: none;

}

