/* ========================================
   ESL GO - REFACTORED & CONSOLIDATED GAMES CSS
   ======================================== */

/* ========================================
   1. GLOBAL & UTILITY STYLES
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=SUSE:wght@400;600;700&display=swap');

/* Default: Light Mode */
:root {
    --primary: #4ECDC4;
    --primary-color: #4ECDC4;
    --primary-dark: #45B7D1;
    --primary-light: #6EF3D6;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --error-color: #F44336;
    --font-family-inter: 'Inter', sans-serif;
    --font-family-display: 'Inter', sans-serif;
    --font-family-mono: 'SUSE', monospace;
    
    /* Global Theme Variables */
    --bg-primary: #f9fbfc;
    --bg-secondary: #e9ecef;
    --bg-game: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --border-color: #dee2e6;
    --btn-bg: #4ECDC4;
    --btn-hover: #45B7D1;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: .75rem;
}

/* Dark Mode - STANDARDIZED WHITE TEXT */
[data-theme="dark"],
.game-root.dark-mode,
.game-landing-root.dark-mode,
.hangman-container.dark-mode,
.game-page.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-game: linear-gradient(135deg, #1e1b4b 0%, #2d1b69 100%);
    --text-primary: #ffffff !important; /* Pure white for maximum contrast */
    --text-secondary: #cbd5e1 !important; /* Bright gray for secondary text */
    --text-muted: #cbd5e1 !important;
    --border: #334155;
    --border-color: #334155;
    --btn-bg: #45B7D1;
    --btn-hover: #4ECDC4;
    --card-bg: #1e293b;
    --input-bg: #1e293b;
    --shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Force white text in dark mode for all elements */
[data-theme="dark"],
.game-root.dark-mode,
.game-landing-root.dark-mode,
.hangman-container.dark-mode,
.game-page.dark-mode {
    color: #ffffff !important;
}

[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] label,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
.game-root.dark-mode p,
.game-root.dark-mode span,
.game-root.dark-mode div,
.game-root.dark-mode h1,
.game-root.dark-mode h2,
.game-root.dark-mode h3,
.game-landing-root.dark-mode p,
.game-landing-root.dark-mode span,
.hangman-container.dark-mode p,
.hangman-container.dark-mode span,
.game-page.dark-mode p,
.game-page.dark-mode span {
    color: #ffffff !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ========================================
   2. REUSABLE COMPONENTS (For All Games)
   ======================================== */

.game-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-shell .action-group {
    display: inline-flex;
    gap: clamp(0.35rem, 1.6vw, 0.6rem);
    background: var(--card-bg);
    padding: clamp(0.25rem, 1vw, 0.5rem);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.game-shell button.g-btn,
.game-shell a.g-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: clamp(36px, 4vw, 44px) !important;
    padding: clamp(0.4rem, 1.6vw, 0.75rem) clamp(0.8rem, 2.4vw, 1.4rem) !important;
    font-size: clamp(0.85rem, 2vw, 1rem) !important;
    font-weight: 600;
    border-radius: 0.65rem;
    border: none !important;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(15,23,42,0.08);
}

.game-shell button.g-btn-primary,
.game-shell a.g-btn-primary {
    background: var(--primary) !important;
    color: #fff !important;
}

.game-shell button.g-btn-secondary,
.game-shell a.g-btn-secondary {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.game-shell .g-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15,23,42,0.12);
}

.game-shell button.g-btn:focus,
.game-shell button.g-btn:focus-visible,
.game-shell a.g-btn:focus,
.game-shell a.g-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.game-shell button.g-btn img,
.game-shell button.g-btn svg,
.game-shell a.g-btn img,
.game-shell a.g-btn svg {
    width: clamp(18px, 3vw, 22px);
    height: clamp(18px, 3vw, 22px);
}

.game-shell button.g-btn-sm,
.game-shell a.g-btn-sm {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
    min-height: 34px !important;
}

/* Dark Mode Switch */
.dark-mode-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.dark-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dark-mode-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #bbb;
    transition: .4s;
    border-radius: 12px;
}

.dark-mode-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .dark-mode-slider {
    background-color: var(--primary-color);
}

input:checked + .dark-mode-slider:before {
    transform: translateX(20px);
}

.dark-mode-label {
    margin-left: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Game Header (Reusable) */
.game-header {
    flex: 0 0 auto;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1rem, 3vw, 2rem);
    padding-left: clamp(3rem, 6vw, 4.5rem);
    position: relative;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.game-header h1 {
    margin: 0 0 .5rem 0;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
}


/* CEFR Display (Reusable) */
.tpd-cefr-level-display {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: .75rem;
    width: 100%;
}

.cefr-blob {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    opacity: .5;
    transition: .2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.cefr-blob.active {
    opacity: 1;
}

.tpd-cefr-text {
    font-size: .75rem;
    color: var(--text-muted);
    margin-left: .5rem;
    font-weight: 600;
}

/* CEFR Colors */
.cefr-pre-a1 { background: #facc15 !important; }
.cefr-a1 { background: #6ee7b7 !important; }
.cefr-a2 { background: #34d399 !important; }
.cefr-b1 { background: #3b82f6 !important; }
.cefr-b2 { background: #8b5cf6 !important; }
.cefr-c1 { background: #ec4899 !important; }
.cefr-c2 { background: #ef4444 !important; }

/* Stats (Reusable) */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: .5rem;
    font-size: clamp(.9rem, 2.5vw, 1rem);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat svg {
    width: clamp(32px, 6vw, 48px);
    height: clamp(32px, 6vw, 48px);
    margin-bottom: .25rem;
}

.stat-label {
    font-size: .75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Stats/Players Wrapper */
.stats-players-wrapper {
    width: 100%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    flex-wrap: wrap;
}

.stats-players-wrapper .game-stats,
.stats-players-wrapper .player-section {
    flex: 0 0 auto;
}

.stats-players-wrapper .player-section {
    margin-top: 0;
    justify-content: center;
    gap: 0.5rem;
}

/* Player Section (Reusable) */
.player-section {
    display: flex; 
    gap: .5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: .75rem;
}

.player-card {
    background: transparent;
    border: 2px solid #60a5fa;
    border-radius: .5rem;
    padding: .4rem .8rem;
    min-width: 80px;
    text-align: center;
    font-size: .9rem;
    color: #60a5fa;
    cursor: pointer;
    transition: .2s;
}

.player-card.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.add-player {
    background: transparent;
    border: 2px solid #60a5fa;
    border-radius: .5rem;
    padding: .4rem .6rem;
    cursor: pointer;
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-player svg {
    width: 24px;
    height: 24px;
}

.add-player:hover {
    border-color: var(--primary-dark);
}

/* Dark Mode Toggle (Checkbox Style) */
#darkModeToggle {
    position: absolute;
    top: 1rem;
    left: 1rem;
    appearance: none;
    width: 44px;
    height: 24px;
    background: #bbb;
    border-radius: 12px;
    cursor: pointer;
    outline: none;
    transition: .2s;
}

#darkModeToggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}

#darkModeToggle:checked {
    background: var(--primary);
}

#darkModeToggle:checked::after {
    transform: translateX(20px);
}

/* Controls (Reusable) */
.controls {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    padding: clamp(.75rem, 2vw, 1rem);
    border-top: 1px solid var(--border);
    background: transparent;
}

.sentence-builder-overlay .controls {
    flex-direction: row; 
    align-items: center;
}

.btn {
    flex: 1 1 100px;
    min-height: 44px;
    padding: .75rem 1rem;
    border: none;
    border-radius: .5rem;
    font-size: clamp(.85rem, 2.5vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .btn {
        font-size: .8rem;
        padding: .6rem .8rem;
    }
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

/* Game-Over Popup (Reusable) */
.game-over {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    display: none;
    align-items: center; 
    justify-content: center;
}

.game-over-box {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 320px;
    text-align: center;
    box-shadow: var(--shadow);
}

.game-over-box h2 {
    font-size: 1.8rem;
    color: #000;
    margin-bottom: .5rem;
}

.game-over-box p {
    font-size: 1rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.game-over-btns {
    display: flex;
    gap: 1rem;
}

.game-over-btns button {
    flex: 1;
    padding: .75rem;
    border: none;
    border-radius: .5rem;
    font-weight: 600; 
    cursor: pointer; 
}

.play-again {
    background: #0d6efd;
    color: #fff;
}

.new-players {
    background: #ffc107;
    color: #000;
}

/* Close Button (Reusable) */
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none; 
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}

/* Responsive (Reusable) */
@media (max-width: 768px) {
    .tpd-cefr-level-display {
        gap: 2px;
    }
    .stat svg {
        width: 24px;
        height: 24px;
    }
    .player-section {
        gap: .4rem;
    }
    .player-card {
        min-width: 70px;
        font-size: .8rem;
    }
    .add-player svg {
        width: 20px;
        height: 20px;
    }
    .controls {
        gap: .5rem;
    }
}

@media (max-width: 480px) {
    .game-stats {
        gap: 1rem;
    }
    .player-section {
        gap: .4rem;
    }
    .fragment {
        flex: 1 1 90px;
        font-size: .85rem;
    }
    .cefr-cluster {
        gap: .25rem;
    }
}

/* ========================================
   3. SENTENCE BUILDER GAME
   ======================================== */

.game-page {
    width: 100%;
    max-width: 1280px;
    height: 100%;
    min-height: clamp(660px, 85vh, 920px);
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.game-main {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: clamp(1rem, 3vw, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 1rem; 
    align-items: stretch;
}

/* Mobile: Remove side padding */
@media (max-width: 767px) {
    .game-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: clamp(0.5rem, 2vw, 1rem);
        padding-bottom: clamp(0.5rem, 2vw, 1rem);
    }
    
    /* Remove side padding from all game containers */
    .game-content-panel,
    .game-layout-container,
    .game-grid-wrapper,
    .game-info-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

.turn-popup {
    background: var(--primary);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: none;
}

.sentence-box {
    background: var(--card-bg);
    border: 3px dashed var(--primary);
    border-radius: var(--radius);
    padding: clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.feedback {
    padding: .75rem;
    border-radius: .5rem;
    text-align: center;
    font-weight: 600;
    font-size: .9rem;
}

.feedback.success {
    background: #d4edda;
    color: #155724;
}

.feedback.error {
    background: #f8d7da;
    color: #721c24;
}

.fragments {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

.fragment {
    flex: 1 1 110px;
    min-height: 44px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: .5rem;
    padding: .5rem .75rem;
    text-align: center;
    font-size: clamp(.9rem, 2.5vw, 1rem);
    cursor: pointer; 
    transition: .2s;
}

.fragment:hover {
    background: var(--bg-secondary);
}

.fragment.used {
    opacity: .4;
    pointer-events: none;
}

/* Sentence Builder Overlay */
.sentence-builder-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

.sentence-builder-overlay__content {
    width: min(1280px, 95vw);
    min-height: clamp(700px, 88vh, 980px);
    max-height: 95vh;
    display: flex;
    flex-direction: column; 
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    background: var(--bg-primary);
}

.sentence-builder-overlay__content .game-page {
    height: 100%;
    min-height: clamp(660px, 85vh, 920px);
}

@media (max-width: 900px) {
    .sentence-builder-overlay__content {
        min-height: clamp(600px, 92vh, 900px);
    }
    .sentence-builder-overlay__content .game-page {
        min-height: clamp(580px, 90vh, 860px);
    }
}

@media (max-width: 640px) {
    .sentence-builder-overlay__content {
        width: 100vw;
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
    }
    .sentence-builder-overlay__content .game-page {
        min-height: 100vh;
    }
}
 
 body:has(.game-overlay.active) {
     overflow: hidden;
 }
 
 .sb-game-page {
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/*Hangman*/

/* Image modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99998;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.image-modal.show {
    display: flex !important;
    z-index: 100001 !important;
}

.image-modal-content {
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border-radius: 1.5rem;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.4);
    border: 3px solid #06b6d4;
    overflow: hidden;
}

.image-modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 2.2rem;
    cursor: pointer;
    color: #666;
    transition: color .3s ease;
}

.image-modal-close:hover {
    color: #000;
}

#wordImage {
    max-width: min(420px, 78vw);
    max-height: min(340px, 55vh);
    border-radius: 14px;
    margin: 1.25rem auto;
    border: 2px solid #06b6d4;
    object-fit: cover;
}

.celebration {
    font-size: 1.1rem;
    color: #4ECDC4;
    font-weight: 600;
}



/* ========================================
   6. CROSSWORD GAME
   ======================================== */

.crossword-overlay__content {
    width: min(1240px, 96vw);
    min-height: clamp(760px, 92vh, 980px);
    max-height: 95vh;
    background: var(--bg-primary);
    border-radius: clamp(1.5rem, 2.8vw, 2.1rem);
    box-shadow: 0 40px 96px rgba(8, 13, 40, 0.38);
    overflow: hidden;
    display: flex;
}

/* Mobile: Fix crossword/wordsearch/memory match offset */
@media (max-width: 767px) {
    .crossword-overlay__content {
        width: 100vw !important;
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .wordsearch-container,
    .game-layout-container,
    .memory-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .game-grid-wrapper,
    .game-info-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Mobile: Fix crossword/wordsearch offset */
@media (max-width: 767px) {
    .crossword-overlay__content {
        width: 100vw !important;
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .wordsearch-container,
    .game-layout-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .game-grid-wrapper,
    .game-info-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ========================================
   6. GAMES LANDING PAGE
   ======================================== */

.games-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* Mobile: Full width game cards */
@media (max-width: 767px) {
    .games-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .games-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .game-card {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.game-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.game-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.difficulty-medium {
    background: #fff3cd;
    color: #856404;
}

.difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

.game-icon-container {
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.game-icon-container svg {
    width: 100%;
    height: 100%;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.game-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0.5rem 0 1.5rem;
    flex-grow: 1;
}

.play-button {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.play-button:hover {
    background: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

.play-button i {
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .game-card {
        padding: 1rem;
    }
    
    .game-icon-container {
        width: 120px;
        height: 120px;
    }
    
    .game-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ========================================
   7. GAME OVERLAY SHELL (Shared)
   ======================================== */

.game-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    z-index: 10000;
}

.game-overlay.active {
    display: flex;
}

.game-overlay .game-overlay-content {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-overlay .game-close-btn {
    position: absolute;
    top: clamp(0.75rem, 2vw, 1.25rem);
    right: clamp(0.75rem, 2vw, 1.25rem);
    width: clamp(2.2rem, 6vw, 2.8rem);
    height: clamp(2.2rem, 6vw, 2.8rem);
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 2;
}

.game-overlay .game-close-btn:hover {
    transform: scale(1.05);
    background: rgba(59, 130, 246, 0.9);
}

@media (max-width: 768px) {
    .game-overlay {
        padding: 0;
    }

    .game-overlay .game-overlay-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ========================================
   8. GAME LANDING PAGES (with Carousel)
   ======================================== */

.game-landing-page {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
}

/* Override Bootstrap container padding on game landing pages */
.game-landing-page .container,
.game-landing-page .container-fluid,
.game-landing-page .container-lg,
.game-landing-page .container-md,
.game-landing-page .container-sm,
.game-landing-page .container-xl,
.game-landing-page .container-xxl {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Global override for Bootstrap containers on game landing pages */
body:has(.game-landing-page) .container,
body:has(.game-landing-page) .container-fluid,
body:has(.game-landing-page) .container-lg,
body:has(.game-landing-page) .container-md,
body:has(.game-landing-page) .container-sm,
body:has(.game-landing-page) .container-xl,
body:has(.game-landing-page) .container-xxl {
    --bs-gutter-x: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Hide footer on game landing pages */
body:has(.game-landing-page) footer.footer {
    display: none !important;
}

/* Prevent body/html scrolling on game landing pages */
body:has(.game-landing-page),
body:has(.game-landing-page) html {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure game landing page is centered */
body:has(.game-landing-page) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    padding: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.6rem, 2vw, 1rem);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
    z-index: 100;
}

.game-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
}

.game-play-btn-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: none !important;
    border: 2px solid rgba(78, 205, 196, 0.8) !important;
    color: #4ECDC4 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    text-decoration: none;
    display: inline-block;
}

.game-play-btn-corner:hover {
    background: rgba(78, 205, 196, 0.1) !important;
    border-color: #4ECDC4 !important;
    color: #4ECDC4 !important;
    transform: scale(1.05);
}

.game-landing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.8rem, 2.5vw, 1.5rem);
    padding-bottom: 1rem;
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: clamp(3rem, 8vh, 5rem);
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden;
    overflow-y: hidden;
    text-align: center;
}

.game-landing-content h1 {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    margin: 0;
    color: #fff;
    text-align: center;
    font-weight: 700;
}

.game-landing-content p {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #a78bfa;
}

.game-icon-container {
    width: clamp(100px, 22vw, 160px);
    height: auto;
    flex-shrink: 0;
    margin: 0;
}

.game-icon-container svg {
    width: 100%;
    height: auto;
}

/* Program Carousel */
.program-carousel-container {
    width: 100%;
    max-width: 100%;
    flex-shrink: 1;
    min-height: 0;
    margin-bottom: 1.5rem;
}

.carousel-title {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-subtitle {
    font-size: 0.9rem;
    color: #a78bfa;
    text-align: center;
    margin: 0 0 1.5rem 0;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    width: 100%;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
    padding: clamp(0.3rem, 1vw, 0.5rem) 0;
    flex: 1;
}

.carousel-track {
    display: flex;
    gap: clamp(0.5rem, 1.5vw, 0.8rem);
    transition: transform 0.4s ease;
    padding-bottom: 1rem;
}

.carousel-loading {
    text-align: center;
    color: #a78bfa;
    padding: clamp(1rem, 3vw, 2rem);
    width: 100%;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.program-book-card {
    flex: 0 0 clamp(90px, 18vw, 130px);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: clamp(0.2rem, 1vw, 0.5rem);
    border: 2px solid transparent;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.program-book-card:hover {
    transform: translateY(-6px);
    border-color: #8b5cf6;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
    text-decoration: none;
}

.program-book-logo {
    width: clamp(70px, 14vw, 90px);
    height: clamp(70px, 14vw, 90px);
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 0.3rem;
}

.program-book-name {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 1.2;
}

.program-book-level {
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    color: #a78bfa;
    text-align: center;
}

.carousel-nav {
    background: transparent;
    border: none;
    color: #8b5cf6;
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    border-radius: 8px;
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    transform: scale(1.15);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    color: #d1d5db;
}

/* Leaderboard Container */
.game-leaderboard-container {
    width: 100%;
    max-width: 800px;
    flex-shrink: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    padding: 0;
    margin: 0;
}

#leaderboard {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    min-height: 0;
    max-height: 100%;
    border: 1px solid rgba(57, 255, 20, 0.3);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem;
}

/* NEON GREEN SCROLLBAR */
#leaderboard::-webkit-scrollbar {
    width: 4px;
}

#leaderboard::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

#leaderboard::-webkit-scrollbar-thumb {
    background: #39ff14;
    border-radius: 5px;
    box-shadow: 0 0 6px #39ff14;
}

#leaderboard::-webkit-scrollbar-thumb:hover {
    background: #32d911;
}

/* Loading States */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #39ff14;
    border-radius: 50%;
    width: clamp(24px, 6vw, 30px);
    height: clamp(24px, 6vw, 30px);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.carousel-loading {
    text-align: center;
    color: #a78bfa;
    padding: clamp(1rem, 3vw, 2rem);
    width: 100%;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Responsive */
@media (max-width: 768px) {
    .game-landing-content {
        padding: clamp(3rem, 8vh, 5rem) clamp(0.8rem, 3vw, 1.5rem) clamp(0.8rem, 2vh, 1.5rem);
        gap: clamp(0.6rem, 2vw, 1.2rem);
    }
    
    .program-carousel-container {
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 480px) {
    .game-back-btn, .game-play-btn-corner {
        font-size: clamp(0.7rem, 2.2vw, 0.85rem);
        padding: clamp(0.3rem, 1.2vw, 0.5rem) clamp(0.5rem, 1.8vw, 0.8rem);
    }
    
    .game-landing-content {
        padding-top: clamp(3.5rem, 10vh, 4.5rem);
    }
    
    .program-carousel-container {
        margin-bottom: 1rem;
    }
}

#gameOverlay.active ~ .game-landing-page {
    display: none;
}

.game-leaderboard-table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    color: #fff;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
}

.game-leaderboard-table thead th {
    text-align: left;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.6rem, 2vw, 1rem) clamp(0.3rem, 1vw, 0.5rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(57, 255, 20, 0.3);
    font-weight: 600;
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    color: #39ff14;
}

.game-leaderboard-table tbody td {
    padding: clamp(0.5rem, 1.5vw, 0.65rem) clamp(0.6rem, 2vw, 1rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.game-leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

.game-leaderboard-table .rank-cell {
    width: clamp(50px, 12vw, 70px);
    font-weight: 700;
    color: #fbbf24;
    white-space: nowrap;
    overflow: visible;
}

.game-leaderboard-table .score-cell {
    text-align: left;
    font-weight: 700;
    color: #38bdf8;
    white-space: nowrap;
    overflow: visible;
}

/* ========================================
   8. LEGACY GAME SUPPORT (Pac-Man, etc.)
   ======================================== */

/* Ensure legacy games still work with basic styling */
.game-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ========================================
   END OF REFACTORED CSS
   ======================================== */


.theme-kid .btn {
    min-height: 65px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.theme-kid .btn.btn-primary,
.theme-kid .btn.btn-secondary,
.theme-kid .btn.btn-danger {
    min-height: 65px;
}

.is-hidden {
    display: none !important;
}


@media (max-width: 900px) {
    .tpd-cefr-level-display {
        gap: 3px;
    }
}

@media (max-width: 600px) {
    .cefr-blob {
        width: 14px;
        height: 14px;
    }
}

.memory-overlay__content {
    width: min(1200px, 96vw);
    min-height: clamp(720px, 90vh, 940px);
    max-height: 96vh;
    background: var(--bg-primary);
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.memory-container {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    gap: clamp(1rem, 3vw, 1.8rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    overflow: hidden;
    background: var(--bg-primary);
}

.memory-sidebar {
    flex: 0 0 clamp(200px, 16vw, 240px);
    max-width: clamp(200px, 16vw, 240px);
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 2vw, 1.2rem);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: clamp(1rem, 3vw, 1.75rem);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.memory-sidebar__header {
        display: flex;
        align-items: center;
    justify-content: space-between;
    gap: clamp(0.5rem, 2vw, 1rem);
}

.memory-sidebar__header h1 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.7rem);
    color: var(--text-primary);
}

.memory-controls {
    display: grid;
    gap: clamp(0.6rem, 1.6vw, 0.9rem);
}

.memory-controls label {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    font-weight: 600;
    color: var(--text-primary);
}

.memory-controls select {
    width: 100%;
    padding: clamp(0.55rem, 1.6vw, 0.75rem) clamp(0.8rem, 2vw, 1rem);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.memory-stats {
    display: flex;
    gap: clamp(0.5rem, 1.4vw, 0.75rem);
    align-items: stretch;
    justify-content: space-between;
}

.memory-stats--row {
    flex: 1 1 auto;
}

.memory-stats .stat-item {
    display: flex;
    align-items: center;
    gap: clamp(0.55rem, 1.4vw, 0.75rem);
    background: var(--card-bg);
    border-radius: 1rem;
    padding: clamp(0.55rem, 1.4vw, 0.75rem) clamp(0.65rem, 1.6vw, 0.9rem);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    flex: 1 1 110px;
    min-width: 0;
}

.memory-stats .stat-icon {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
}

.memory-stats .stat-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.memory-stats .stat-value {
    font-size: clamp(1.1rem, 2.6vw, 1.4rem);
    font-weight: 700;
    color: var(--text-primary);
}

.memory-stats .stat-label {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    color: var(--text-muted);
}

.memory-matched-pairs {
    display: flex;
    flex-direction: column;
    gap: clamp(0.4rem, 1.8vw, 0.6rem);
}

.memory-matched-pairs h2 {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-primary);
}

.pairs-list {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.35rem, 1.2vw, 0.5rem);
}

.matched-word {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: clamp(0.35rem, 1vw, 0.55rem) clamp(0.6rem, 1.6vw, 0.9rem);
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.memory-status {
    margin: 0;
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    font-weight: 600;
    color: var(--text-secondary);
}

.memory-new-game {
    width: 100%;
}

.memory-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding-bottom: clamp(1rem, 3vw, 1.5rem);
    overflow: hidden;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 4), 1fr);
    grid-template-rows: repeat(var(--grid-rows, 4), 1fr);
    gap: clamp(0.1rem, 1.2vw, 0.2rem);
    width: 100%;
    max-width: min(640px, 100%);
}

.memory-grid::before {
    content: '';
}

.memory-card {
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    width: 100%;
    padding-top: 120%;
}

.memory-card .card-inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.memory-card.flipped .card-inner,
.memory-card.matched .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease;
    background: var(--card-bg);
    color: var(--primary-color);
}

.card-front {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.card-back {
    transform: rotateY(180deg);
    padding: clamp(0.6rem, 2vw, 0.9rem);
    text-align: center;
}

.card-word {
    font-size: clamp(1rem, 2.4vw, 1.3rem);
    font-weight: 700;
    color: var(--text-primary);
}

.card-image img,
.card-image span,
.card-image iconify-icon {
    display: block;
    font-size: clamp(2rem, 5vw, 3.4rem);
    width: clamp(62px, 13vw, 84px);
    height: clamp(62px, 13vw, 84px);
    margin: 0 auto;
}

.memory-controls-footer {
    justify-content: flex-end;
}

.memory-container.dark-mode,
.memory-container.dark-mode .memory-sidebar {
    background: var(--bg-primary);
}

.memory-container.dark-mode .memory-sidebar {
    background: #1a1a2e;
    border-color: #06b6d4;
}

.memory-container.dark-mode .memory-sidebar h1,
.memory-container.dark-mode .memory-status {
    color: #06b6d4;
}

.memory-container.dark-mode label,
.memory-container.dark-mode .stat-label {
    color: #e2e8f0;
}

.memory-container.dark-mode select {
    background: #16213e;
    color: #e2e8f0;
    border-color: #06b6d4;
}

.memory-container.dark-mode .stat-value {
    color: #06b6d4;
}

.memory-container.dark-mode .matched-word {
    background: rgba(6, 182, 212, 0.1);
    border-color: #06b6d4;
    color: #06b6d4;
}

.memory-container.dark-mode .memory-grid {
    background: transparent;
}

.memory-container.dark-mode .card-front {
    background: #16213e;
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.memory-container.dark-mode .card-back {
    background: rgba(8, 13, 35, 0.85);
    border-color: #06b6d4;
}

.memory-container.dark-mode .card-word {
    color: #06b6d4;
}

@media (max-width: 1024px) {
    .memory-container {
    flex-direction: column; 
}
    .memory-sidebar {
        flex-direction: row; 
        flex-wrap: wrap;
        gap: clamp(0.75rem, 2vw, 1rem);
    }
    .memory-sidebar__header {
        width: 100%;
    }
    .memory-controls--row,
    .memory-stats--row {
        width: 100%;
    }
    .memory-stats {
        gap: clamp(0.5rem, 1.4vw, 0.75rem);
    }
    .memory-matched-pairs,
    .memory-status {
        order: 3;
    }
}

@media (max-width: 768px) {
    .memory-sidebar {
    flex-direction: column; 
    align-items: stretch;
    }
    .memory-controls--row,
    .memory-stats--row,
    .memory-matched-pairs,
    .memory-status,
    .memory-new-game {
        width: 100%;
    }
    .memory-grid {
    width: 100%;
        grid-template-columns: repeat(3, minmax(96px, 1fr));
        gap: clamp(0.3rem, 2vw, 0.5rem);
    }
}

@media (max-width: 520px) {
    .memory-grid {
        grid-template-columns: repeat(3, minmax(80px, 1fr));
        gap: clamp(0.25rem, 2vw, 0.4rem);
    }
    .memory-overlay__content {
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    .memory-container {
        padding: clamp(0.75rem, 4vw, 1rem);
    }
}

.sentence-builder-overlay .controls {
    flex-direction: row;
    align-items: center;
}

.sentence-builder-overlay .game-main {
    justify-content: flex-end;
    align-items: stretch;
    padding-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.sentence-builder-cefr-row .tpd-cefr-level-display {
    width: auto;
    justify-content: center;
}

.sentence-builder-cefr-row .tpd-cefr-text {
    margin-left: 0.5rem;
}

.memory-container.dark-mode .memory-sidebar__subtitle {
    color: rgba(226, 232, 240, 0.75);
}


/* =========================================
   WORD SEARCH PRO – V25 LAYOUT
   ========================================= */

/* =========================================
   KID THEME NEUTRALISERS (GAME OVERLAYS)
   ========================================= */
body.theme-kid .game-overlay,
body.theme-kid .game-overlay * {
    font-family: 'Inter', sans-serif !important;
    font-weight: inherit;
}

body.theme-kid .game-shell .btn,
body.theme-kid .game-shell .g-btn,
body.theme-kid .game-shell button {
    min-height: auto;
    height: auto;
    padding: clamp(0.45rem, 1.6vw, 0.8rem) clamp(0.8rem, 2vw, 1.1rem);
    border-radius: 0.65rem;
    font-size: clamp(0.85rem, 2vw, 1rem);
    box-shadow: none;
    transform: none;
}

body.theme-kid .game-shell .btn-primary {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}

body.theme-kid .game-shell .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.theme-kid .game-shell .player-card,
body.theme-kid .game-shell .add-player,
body.theme-kid .game-shell .add-player-btn {
    box-shadow: none;
    transform: none;
}

body.theme-kid .game-shell .game-header,
body.theme-kid .game-shell .wordsearch-grid-container,
body.theme-kid .game-shell .crossword-grid-container,
body.theme-kid .game-shell .hangman-frame,
body.theme-kid .game-shell .sentence-builder-overlay__content {
    box-shadow: inherit;
    transform: none;
}
