/* Game-specific styles (Shared tokens moved to serene-core.css) */
/* Main Layout */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 16px 30px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.game-arena {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* HUD Info Strip */
.hud-strip {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.hud-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.hud-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 2px;
}

.hud-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

/* Board Container & Sudoku Grid */
.board-container {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    position: relative;
}

.sudoku-grid {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    border: 2.5px solid var(--accent-dark);
    border-radius: 8px;
    overflow: hidden;
    background: #cbd5e1;
    gap: 1px;
}

.sudoku-cell {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: #3b82f6;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    position: relative;
}

.sudoku-cell.given {
    color: var(--accent-dark);
    font-weight: 800;
}

.sudoku-cell.selected {
    background: #bfdbfe !important;
}

.sudoku-cell.highlight-axis {
    background: #f1f5f9;
}

.sudoku-cell.highlight-same {
    background: #dbeafe;
}

.sudoku-cell.error {
    color: #ef4444 !important;
    background: #fee2e2 !important;
}

/* 3x3 Subgrid Borders */
.sudoku-cell[data-c="2"], .sudoku-cell[data-c="5"] {
    border-right: 2px solid var(--accent-dark);
}
.sudoku-cell[data-r="2"], .sudoku-cell[data-r="5"] {
    border-bottom: 2px solid var(--accent-dark);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    padding: 2px;
    pointer-events: none;
}

.note-digit {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Keypad & Tools */
.keypad-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.numpad-tools {
    display: flex;
    gap: 8px;
}

.tool-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.tool-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
}

.tool-btn.active {
    background: var(--accent-dark);
    color: #ffffff;
    border-color: var(--accent-dark);
}

.numpad-digits {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 6px;
}

.num-btn {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--accent-dark);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.num-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Banner */
.status-banner {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    padding: 28px 36px;
    box-shadow: var(--shadow-elevated);
    backdrop-filter: blur(24px);
    z-index: 100;
    text-align: center;
    min-width: 300px;
    max-width: 90vw;
}

.status-banner h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-dark);
    margin-bottom: 6px;
}

.status-banner p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-gold {
    background: var(--accent-dark);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-gold:hover {
    background: var(--accent-dark-hover);
    transform: translateY(-1px);
}


/* ==========================================================================
   STANDARDIZED LOBBY & DRAWER TOKENS (Serene Light-Glass Master Standard)
   ========================================================================== */

/* Standardized Match Action Buttons */
.btn-resume-match {
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    border-radius: 50%;
    background: var(--accent-dark, #0f172a);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    margin: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: -0.2px;
}

.btn-resume-match:hover {
    background: var(--accent-dark-hover, #1e293b);
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.btn-dismiss-match {
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    border-radius: 50%;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    text-align: center;
}

.btn-dismiss-match:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
    color: #dc2626;
    transform: scale(1.08);
}

/* Modernized Lobby Mode Cards */
.lobby-mode-card {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.lobby-mode-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

/* Difficulty Selector */
.diff-selector {
    display: flex;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    padding: 3px;
    gap: 3px;
    margin-top: 6px;
    width: 100%;
}

.diff-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted, #64748b);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 0;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-family: inherit;
}

.diff-btn:hover {
    color: var(--text-main, #0f172a);
    background: rgba(255, 255, 255, 0.5);
}

.diff-btn.active {
    background: var(--accent-dark, #0f172a);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.diff-elo {
    font-size: 0.72em;
    opacity: 0.75;
    font-weight: 500;
    margin-left: 3px;
    letter-spacing: -0.02em;
}

/* Ecosystem Group */
.ecosystem-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.ecosystem-group .drawer-link {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
}


/* Unified Active Games Type Badges */
.game-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}
.game-type-badge.pente { background: rgba(16, 185, 129, 0.12); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.game-type-badge.chess { background: rgba(15, 23, 42, 0.08); color: #0f172a; border: 1px solid rgba(15, 23, 42, 0.2); }
.game-type-badge.othello { background: rgba(59, 130, 246, 0.12); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.3); }
.game-type-badge.battleship { background: rgba(239, 68, 68, 0.12); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.3); }
.game-type-badge.backgammon { background: rgba(245, 158, 11, 0.12); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.3); }
.game-type-badge.sudoku { background: rgba(139, 92, 246, 0.12); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.3); }
.game-type-badge.solitaire { background: rgba(236, 72, 153, 0.12); color: #db2777; border: 1px solid rgba(236, 72, 153, 0.3); }
