/* ============================================
   SmartKid — Professional Design System
   ============================================ */

:root {
    --yellow: #FFD93D;
    --yellow-soft: #FFF3CD;
    --green: #6BCB77;
    --green-soft: #D4EDDA;
    --blue: #4D96FF;
    --blue-soft: #DBEAFE;
    --coral: #FF6B6B;
    --coral-soft: #FFE0E0;
    --violet: #C4B0FF;
    --violet-soft: #EDE7FF;
    --bg: #F4F0FF;
    --bg-warm: #FFFBF0;
    --text: #2D2B3D;
    --text-light: #7B7890;
    --white: #FFFFFF;
    --card-bg: #FFFFFF;
    --border-light: rgba(0,0,0,0.06);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.14);
    --shadow-glow: 0 0 20px rgba(77,150,255,0.15);
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.05);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.18);
    --page-bg: #F4F0FF;
    --border: #DDD8EE;
    --font: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    --transition: 0.3s cubic-bezier(.4,0,.2,1);
    --transition-fast: 0.15s cubic-bezier(.4,0,.2,1);
    --transition-bounce: 0.4s cubic-bezier(.34,1.56,.64,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: linear-gradient(160deg, #EDE6FF 0%, #F5F2FF 40%, #EDF4FF 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ambient background orbs */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 10% 15%, rgba(77,150,255,0.09) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 90% 85%, rgba(196,176,255,0.11) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 70% 10%, rgba(107,203,119,0.06) 0%, transparent 50%),
        radial-gradient(ellipse 35% 40% at 20% 80%, rgba(255,107,107,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a { text-decoration: none; color: inherit; }
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* ============================================
   App Container
   ============================================ */
.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Header
   ============================================ */
.header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 40px;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.93) 0%, rgba(237,231,255,0.65) 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.95);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77,150,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,107,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.mascot {
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.mascot::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,217,61,0.2) 0%, transparent 70%);
    z-index: -1;
}

.mascot-svg {
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.12));
    width: 90px;
    height: 90px;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-logo {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
}

.brand-intel {
    background: linear-gradient(135deg, #4D96FF 0%, #7B68EE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-kids {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF9800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.brand-kids::after {
    content: '✦';
    position: absolute;
    top: -8px;
    right: -16px;
    font-size: 0.45em;
    background: linear-gradient(135deg, #FFD93D, #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.6; transform: scale(1.2) rotate(15deg); }
}

.brand-tagline {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    opacity: 0.7;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

.subtitle {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.3px;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar-container {
    background: linear-gradient(135deg, rgba(255,255,255,0.97) 0%, rgba(237,231,255,0.6) 100%);
    border-radius: var(--radius);
    padding: 18px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid rgba(196,176,255,0.2);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-nota {
    font-size: 0.95rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 8px;
    background: #F0EDF5;
    color: var(--text-light);
}
.progress-nota.nota-ok { background: #FFF3E0; color: #E67E22; }
.progress-nota.nota-bine { background: #E8F5E9; color: #27AE60; }
.progress-nota.nota-excelent { background: linear-gradient(135deg, #FFF9C4, #F0F4C3); color: #F57F17; }

.progress-track {
    height: 10px;
    background: #F0EDF5;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--green) 0%, var(--blue) 50%, var(--violet) 100%);
    transition: width 0.8s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: shimmer 2.5s ease-in-out infinite;
}

/* ============================================
   Age Selector
   ============================================ */
.age-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 24px;
}

.age-btn {
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(248,246,255,1) 100%);
    color: var(--text);
    box-shadow: var(--shadow);
    transition: var(--transition-bounce);
    border: 2px solid rgba(196,176,255,0.25);
    letter-spacing: 0.2px;
}

.age-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
    background: linear-gradient(135deg, #fff 0%, #EEF5FF 100%);
}

.age-btn.active {
    background: linear-gradient(135deg, var(--blue) 0%, #7B68EE 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 24px rgba(77,150,255,0.4);
    transform: translateY(-2px);
}

/* ============================================
   Category Filter
   ============================================ */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.cat-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--text-light);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    border: 1.5px solid var(--border-light);
}

.cat-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    color: var(--text);
}

.cat-btn.active {
    background: linear-gradient(135deg, var(--violet) 0%, #A78BFA 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(167,139,250,0.45);
    transform: translateY(-1px);
}

/* ============================================
   Games Grid
   ============================================ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 48px;
}

/* ============================================
   Game Card
   ============================================ */
.game-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px 24px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    animation: slideUp 0.45s ease-out both;
}

/* Colored accent stripe at top */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--card-color, var(--blue)), color-mix(in srgb, var(--card-color, var(--blue)) 70%, white));
    border-radius: var(--radius) var(--radius) 0 0;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 0 0 2px var(--card-color, var(--blue));
    border-color: transparent;
}

.game-card:active {
    transform: translateY(-3px) scale(0.98);
}

/* Stagger card entrance animations */
.games-grid .game-card:nth-child(6n+1) { animation-delay: 0.04s; }
.games-grid .game-card:nth-child(6n+2) { animation-delay: 0.08s; }
.games-grid .game-card:nth-child(6n+3) { animation-delay: 0.12s; }
.games-grid .game-card:nth-child(6n+4) { animation-delay: 0.16s; }
.games-grid .game-card:nth-child(6n+5) { animation-delay: 0.20s; }
.games-grid .game-card:nth-child(6n+6) { animation-delay: 0.24s; }

.game-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: linear-gradient(135deg, var(--coral), #FF8E8E);
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255,107,107,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.game-icon {
    font-size: 2.8rem;
    line-height: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--card-color, #4D96FF) 12%, white);
    margin: 0 auto 6px;
    transition: var(--transition-bounce);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.07));
}

.game-card:hover .game-icon {
    transform: scale(1.12) rotate(-5deg);
    background: color-mix(in srgb, var(--card-color, #4D96FF) 22%, white);
}

.game-card h2 {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.2px;
}

.game-card > p {
    font-size: 0.88rem;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.4;
}

.game-difficulty {
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    background: var(--card-color, var(--blue));
    padding: 3px 12px;
    border-radius: 50px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.game-stars {
    display: flex;
    gap: 4px;
    font-size: 1.3rem;
    margin-top: 2px;
}

.star {
    color: #E0DDE8;
    transition: var(--transition-bounce);
}

.star.filled {
    color: var(--yellow);
    filter: drop-shadow(0 1px 3px rgba(255,217,61,0.4));
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 0;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
    border-top: 1px solid rgba(196,176,255,0.2);
    margin-top: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(237,231,255,0.4) 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    backdrop-filter: blur(8px);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    padding: 32px 24px;
    text-align: left;
}

.footer-col h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.footer-col p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 4px;
}

.footer-col nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-col nav a {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col nav a:hover {
    color: var(--blue);
}

.footer-bottom {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid rgba(196,176,255,0.2);
    background: rgba(77,150,255,0.04);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 2px 0;
}

/* ============================================
   Hero Banner (SEO + Visual)
   ============================================ */
.hero-banner {
    text-align: center;
    padding: 32px 24px;
    margin: 0 0 8px;
    background: linear-gradient(135deg, rgba(77,150,255,0.1) 0%, rgba(196,176,255,0.13) 50%, rgba(255,217,61,0.1) 100%);
    border-radius: var(--radius);
    border: 1px solid rgba(196,176,255,0.25);
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 8px;
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 550px;
    margin: 0 auto 16px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(196,176,255,0.3);
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
}

/* ============================================
   Game Page Layout
   ============================================ */
.game-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 24px;
    gap: 12px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.97) 0%, rgba(237,231,255,0.7) 100%);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    transition: var(--transition);
    color: var(--text);
    border: 1px solid rgba(196,176,255,0.3);
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.game-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.3px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--yellow);
    background: linear-gradient(135deg, rgba(255,255,255,0.97) 0%, rgba(255,249,219,0.8) 100%);
    padding: 8px 18px;
    border-radius: 50px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,217,61,0.2);
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.game-instruction {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    padding: 18px 28px 14px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.game-instruction.pulse-in {
    animation: pulseIn 0.5s ease;
}

@keyframes pulseIn {
    0% { transform: scale(0.97); opacity: 0.7; }
    60% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.game-instruction::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--violet), var(--coral));
    border-radius: 4px 4px 0 0;
}

/* ============================================
   Feedback Overlay
   ============================================ */
.feedback-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.feedback-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.feedback-content {
    font-size: 2.6rem;
    font-weight: 900;
    padding: 32px 56px;
    border-radius: var(--radius);
    animation: popIn 0.4s ease-out;
    box-shadow: var(--shadow-xl);
}

.feedback-content.correct {
    background: linear-gradient(135deg, #C8F0D0, #A8E6B8);
    color: #1A6E30;
    border: 2px solid rgba(107,203,119,0.4);
}

.feedback-content.wrong {
    background: linear-gradient(135deg, #FFD5D5, #FFBABA);
    color: #A0202B;
    border: 2px solid rgba(255,107,107,0.4);
    animation: popIn 0.4s ease-out, shake 0.4s ease-out 0.1s;
}

/* ============================================
   Common Game Components
   ============================================ */
.options-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.option-btn {
    padding: 16px 28px;
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--card-bg);
    border: 2.5px solid #EDE7FF;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition-bounce);
    cursor: pointer;
    min-width: 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(77,150,255,0.07), transparent);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: inherit;
    pointer-events: none;
}

.option-btn:hover {
    transform: translateY(-4px) scale(1.06);
    border-color: var(--blue);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(77,150,255,0.1);
}

.option-btn:hover::before {
    opacity: 1;
}

.option-btn:active {
    transform: scale(0.96);
}

.option-btn.correct {
    background: var(--green-soft);
    border-color: var(--green);
    animation: popIn 0.3s;
}

.option-btn.wrong {
    background: var(--coral-soft);
    border-color: var(--coral);
    animation: shake 0.4s;
}

.btn-primary {
    padding: 14px 36px;
    font-size: 1.05rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), #7B68EE);
    color: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(77,150,255,0.35);
    cursor: pointer;
    transition: var(--transition-bounce);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(77,150,255,0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #5AB868);
    box-shadow: 0 4px 20px rgba(107,203,119,0.3);
}

.btn-success:hover {
    box-shadow: 0 8px 30px rgba(107,203,119,0.4);
}

.btn-coral {
    background: linear-gradient(135deg, var(--coral), #FF8E8E);
    box-shadow: 0 4px 20px rgba(255,107,107,0.3);
}

.btn-coral:hover {
    box-shadow: 0 8px 30px rgba(255,107,107,0.4);
}

/* ============================================
   Confetti
   ============================================ */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-6px) rotate(1deg); }
    66% { transform: translateY(-3px) rotate(-1deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes popIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes confettiFall {
    0% { top: -20px; opacity: 1; }
    100% { top: 110vh; opacity: 0; }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { transform: translateX(-200%); }
    100% { transform: translateX(300%); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(77,150,255,0.2); }
    50% { box-shadow: 0 0 0 8px rgba(77,150,255,0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   Memory Zoo Specific
   ============================================ */
.memory-grid {
    display: grid;
    gap: 12px;
    justify-content: center;
}

.memory-grid.grid-2x2 { grid-template-columns: repeat(2, 90px); }
.memory-grid.grid-2x3 { grid-template-columns: repeat(3, 90px); }
.memory-grid.grid-2x4 { grid-template-columns: repeat(4, 85px); }
.memory-grid.grid-3x4 { grid-template-columns: repeat(4, 85px); }
.memory-grid.grid-4x4 { grid-template-columns: repeat(4, 85px); }
.memory-grid.grid-4x5 { grid-template-columns: repeat(5, 75px); }
.memory-grid.grid-4x6 { grid-template-columns: repeat(6, 70px); }

.memory-card {
    width: 85px;
    height: 95px;
    perspective: 600px;
    cursor: pointer;
}

.memory-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

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

.memory-card-front,
.memory-card-back {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    box-shadow: var(--shadow);
    font-size: 2.2rem;
}

.memory-card-front {
    background: linear-gradient(135deg, var(--coral), var(--violet));
    color: white;
    font-size: 1.8rem;
}

.memory-card-back {
    background: white;
    transform: rotateY(180deg);
    border: 2px solid #EDE7FF;
}

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

.memory-card.matched .memory-card-back {
    border-color: var(--green);
    background: var(--green-soft);
}

/* ============================================
   Atelier (Canvas Drawing)
   ============================================ */
.canvas-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    touch-action: none;
    border: 1px solid var(--border-light);
}

.canvas-container canvas {
    border-radius: var(--radius-sm);
    cursor: crosshair;
    display: block;
}

.palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.color-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition-bounce);
}

.color-swatch:hover,
.color-swatch.active {
    transform: scale(1.2);
    border-color: var(--text);
    box-shadow: var(--shadow-md);
}

.brush-sizes {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.brush-btn {
    background: white;
    border: 2.5px solid #EDE7FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.brush-btn:hover,
.brush-btn.active {
    border-color: var(--blue);
    box-shadow: var(--shadow-glow);
}

.brush-dot {
    border-radius: 50%;
    background: var(--text);
}

/* ============================================
   Puzzle Specific
   ============================================ */
.sequence-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.seq-item {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: white;
    box-shadow: var(--shadow);
    font-size: 2rem;
    font-weight: 900;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.seq-item.missing {
    border: 2.5px dashed var(--violet);
    background: var(--violet-soft);
    font-size: 1.5rem;
    color: var(--violet);
}

.seq-item.filled {
    animation: popIn 0.4s ease-out;
    border: 2.5px solid var(--green);
    background: var(--green-soft);
}

/* ============================================
   Drag & Drop (Literele Vesele)
   ============================================ */
.letter-display {
    font-size: 5rem;
    font-weight: 900;
    background: white;
    padding: 20px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    cursor: grab;
    user-select: none;
    transition: var(--transition);
    touch-action: none;
    border: 1px solid var(--border-light);
}

.letter-display:active {
    cursor: grabbing;
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.drop-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.drop-target {
    width: 130px;
    height: 130px;
    background: white;
    border: 2.5px dashed #D5D0E5;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 2.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.drop-target .target-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
}

.drop-target:hover,
.drop-target.drag-over {
    border-color: var(--blue);
    background: var(--blue-soft);
    transform: scale(1.05);
}

.drop-target.correct {
    border-color: var(--green);
    background: var(--green-soft);
    animation: popIn 0.4s;
}

.drop-target.wrong {
    border-color: var(--coral);
    background: var(--coral-soft);
    animation: shake 0.4s;
}

/* ============================================
   Numere Specific
   ============================================ */
.number-display {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.number-object {
    font-size: 2.5rem;
    animation: popIn 0.4s ease-out backwards;
}

.equation-display {
    font-size: 2.5rem;
    font-weight: 900;
    background: white;
    padding: 18px 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    letter-spacing: 2px;
}

/* ============================================
   Color Quiz (Atelier)
   ============================================ */
.color-mix-demo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.color-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    border: 3px solid white;
}

.color-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition-bounce);
}

.color-option:hover {
    transform: scale(1.15);
}

.color-option.correct {
    border-color: var(--green);
    box-shadow: 0 0 0 4px var(--green);
}

.color-option.wrong {
    border-color: var(--coral);
    animation: shake 0.4s;
}

/* ============================================
   Level Complete Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: white;
    border-radius: var(--radius);
    padding: 48px 40px 40px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: popIn 0.4s ease-out;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
}

.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--blue), var(--violet), var(--coral), var(--green));
    pointer-events: none;
}

.modal-box h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text);
}

.modal-box .modal-stars {
    font-size: 2.5rem;
    margin: 14px 0;
    filter: drop-shadow(0 2px 4px rgba(255,217,61,0.3));
    display: block;
}

.modal-box p {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 24px;
    font-size: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ============================================
   Labirint
   ============================================ */
.maze-canvas {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    background: white;
    display: block;
    margin: 0 auto;
    touch-action: none;
    border: 2px solid var(--border);
    max-width: 100%;
}

.maze-controls {
    display: grid;
    grid-template-areas:
        ". up ."
        "left . right"
        ". down .";
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.maze-btn {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    background: white;
    border: 2px solid #EDE7FF;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.maze-btn:hover, .maze-btn:active {
    background: linear-gradient(135deg, var(--blue), #7B68EE);
    color: white;
    border-color: var(--blue);
    box-shadow: 0 4px 16px rgba(77,150,255,0.3);
}

.maze-btn[data-dir="up"] { grid-area: up; }
.maze-btn[data-dir="left"] { grid-area: left; }
.maze-btn[data-dir="right"] { grid-area: right; }
.maze-btn[data-dir="down"] { grid-area: down; }

/* ============================================
   Simon Spune
   ============================================ */
.simon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 280px;
    height: 280px;
}

.simon-btn {
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.65;
}

.simon-btn:hover { opacity: 0.8; }
.simon-btn.lit {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 0 60px 10px currentColor, 0 0 0 4px #fff;
    filter: brightness(1.5);
}

.simon-lives {
    font-size: 1.6rem;
    letter-spacing: 4px;
    margin-top: 10px;
    text-align: center;
    min-height: 2.2rem;
}

/* ============================================
   Sortează
   ============================================ */
.sort-bins {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.sort-bin {
    width: 140px;
    min-height: 160px;
    background: white;
    border: 2.5px dashed #D5D0E5;
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.sort-bin.drag-over {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: var(--shadow-glow);
}

.sort-bin-label {
    font-weight: 900;
    font-size: 1rem;
    color: var(--text);
}

.sort-item {
    font-size: 2rem;
    padding: 8px 16px;
    background: white;
    border: 2px solid #EDE7FF;
    border-radius: var(--radius-sm);
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.sort-item:active { cursor: grabbing; transform: scale(1.1); }

.sort-items-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 18px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

/* ============================================
   Piano (Pianul Fermecat) — Enhanced
   ============================================ */

/* Controls bar */
.piano-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}
.piano-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.piano-inst-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.piano-inst-btn.active {
    background: var(--blue-soft);
    border-color: var(--blue);
    color: var(--blue);
}
.piano-inst-btn:hover { transform: scale(1.05); }

/* Recording active pulse */
.btn-coral.recording {
    animation: rec-pulse 1s infinite;
}
@keyframes rec-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.5); }
    50% { box-shadow: 0 0 0 10px rgba(255,107,107,0); }
}

/* Note visualizer */
.piano-visualizer {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(30,30,50,0.05) 0%, transparent 100%);
    margin-bottom: 8px;
}
.vis-note {
    position: absolute;
    bottom: 8px;
    border-radius: 50%;
    opacity: 1;
    transition: transform 0.7s ease-out, opacity 0.7s ease-out;
    pointer-events: none;
    box-shadow: 0 0 12px currentColor;
}

/* Piano wrapper — scroll on small screens */
.piano-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px 0 20px;
    -webkit-overflow-scrolling: touch;
}

/* Piano container — 2 octaves */
.piano-container.piano-2oct {
    display: flex;
    justify-content: center;
    position: relative;
    height: 220px;
    margin: 0 auto;
    min-width: 700px;
}

.piano-key {
    position: relative;
    cursor: pointer;
    transition: background 0.08s, transform 0.08s, box-shadow 0.08s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.piano-key.white {
    width: 44px;
    height: 200px;
    background: linear-gradient(180deg, #fff 0%, #F5F3FA 100%);
    border: 2px solid #D5D0E5;
    border-radius: 0 0 10px 10px;
    z-index: 1;
    margin: 0 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06), inset 0 -4px 6px rgba(0,0,0,0.02);
}
.piano-key.white:hover {
    background: linear-gradient(180deg, #fff 0%, #EDE8FF 100%);
}
.piano-key.white.active {
    background: linear-gradient(180deg, var(--blue-soft) 0%, #B8D4FF 100%);
    border-color: var(--blue);
    box-shadow: 0 2px 16px rgba(77,150,255,0.35);
    transform: scaleY(0.98);
    transform-origin: top;
}
.piano-key.white.highlight {
    background: linear-gradient(180deg, var(--green-soft) 0%, #A8F0C0 100%);
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(107,203,119,0.5);
    animation: glow-green 0.8s infinite alternate;
}
.piano-key.white.wrong-flash {
    background: var(--coral-soft) !important;
    border-color: var(--coral) !important;
}

.piano-key.black {
    width: 28px;
    height: 130px;
    background: linear-gradient(180deg, #2A2840 0%, #1C1C2E 100%);
    border-radius: 0 0 6px 6px;
    z-index: 2;
    margin: 0 -14px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3), inset 0 -2px 4px rgba(255,255,255,0.05);
}
.piano-key.black:hover {
    background: linear-gradient(180deg, #3A3858 0%, #2D2B3D 100%);
}
.piano-key.black.active {
    background: linear-gradient(180deg, #5D5A8D 0%, #4D4A6D 100%);
    box-shadow: 0 2px 12px rgba(77,150,255,0.4);
    transform: scaleY(0.97);
    transform-origin: top;
}
.piano-key.black.highlight {
    background: linear-gradient(180deg, #4CAF50 0%, #388E3C 100%);
    box-shadow: 0 0 16px rgba(107,203,119,0.5);
    animation: glow-green 0.8s infinite alternate;
}
.piano-key.black.wrong-flash {
    background: linear-gradient(180deg, #FF6B6B 0%, #C0392B 100%) !important;
}

@keyframes glow-green {
    from { box-shadow: 0 0 12px rgba(107,203,119,0.4); }
    to   { box-shadow: 0 0 24px rgba(107,203,119,0.7); }
}

.piano-key .key-label {
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-light);
    pointer-events: none;
    line-height: 1.2;
}
.piano-key .key-label small {
    font-weight: 600;
    opacity: 0.5;
    font-size: 0.55rem;
}
.piano-key.black .key-label {
    color: #999;
    bottom: 6px;
    font-size: 0.55rem;
}

/* Melody progress bar */
.piano-melody-bar {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
}
.piano-melody-info {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.piano-melody-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.piano-melody-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--green), var(--blue));
    border-radius: 4px;
    transition: width 0.3s ease;
}
.piano-streak {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--coral);
    margin-top: 6px;
    min-height: 1.2em;
}

/* Recording bar */
.piano-rec-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}
.piano-rec-bar span {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Melody picker overlay */
.piano-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.piano-picker-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 28px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}
.piano-picker-box h3 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.piano-picker-section {
    margin-bottom: 14px;
}
.piano-picker-section h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.piano-picker-melody {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 6px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--page-bg);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
}
.piano-picker-melody:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
    transform: translateX(4px);
}
.piano-picker-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* Responsive piano */
@media (max-width: 768px) {
    .piano-container.piano-2oct { min-width: 600px; }
    .piano-key.white { width: 38px; height: 180px; }
    .piano-key.black { width: 24px; height: 115px; margin: 0 -12px; }
}
@media (max-width: 480px) {
    .piano-container.piano-2oct { min-width: 520px; }
    .piano-key.white { width: 32px; height: 160px; }
    .piano-key.black { width: 20px; height: 100px; margin: 0 -10px; }
    .piano-controls { gap: 6px; }
    .piano-inst-btn { font-size: 0.7rem; padding: 4px 8px; }
}

/* ============================================
   Ceas (Clock)
   ============================================ */
.clock-face {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: white;
    border: 5px solid var(--text);
    position: relative;
    box-shadow: var(--shadow-md), inset 0 0 20px rgba(0,0,0,0.03);
    margin: 0 auto;
}

.clock-number {
    position: absolute;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--text);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 4px;
}

/* Tick marks for clock face */
.clock-tick {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
}

.clock-tick-hour {
    width: 3px;
    height: 12px;
    background: var(--text);
    margin-left: -1.5px;
    border-radius: 2px;
    bottom: calc(50% + 83px);
}

.clock-tick-min {
    width: 1px;
    height: 6px;
    background: #bbb;
    margin-left: -0.5px;
    border-radius: 1px;
    bottom: calc(50% + 89px);
}

.clock-hand.hour {
    width: 9px;
    height: 65px;
    background: var(--coral);
    margin-left: -4.5px;
    border-radius: 6px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
}

.clock-hand.minute {
    width: 6px;
    height: 90px;
    background: var(--blue);
    margin-left: -3px;
    border-radius: 6px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
}

.clock-center {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--coral);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 3px white;
}

/* ============================================
   Forme Magice
   ============================================ */
.shape-canvas-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    position: relative;
    border: 1px solid var(--border-light);
}

.shape-palette {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.shape-draggable {
    width: 60px;
    height: 60px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: white;
    border: 2.5px solid #EDE7FF;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transition: var(--transition);
    user-select: none;
}

.shape-draggable:hover {
    transform: scale(1.1);
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Găsește Diferențele
   ============================================ */
.diff-grid-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.diff-grid {
    display: grid;
    gap: 4px;
    background: white;
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.diff-cell {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition);
}

.diff-cell:hover {
    background: #F8F6FF;
}

.diff-cell.found {
    background: var(--green-soft);
    animation: popIn 0.3s;
}

.diff-cell.wrong-click {
    animation: shake 0.3s;
    background: #FFE0E0;
}

.diff-cell.wrong-click::after {
    content: '❌';
    font-size: 0.8rem;
    position: absolute;
}

/* ============================================
   Cuvinte Ascunse
   ============================================ */
.letter-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.letter-tile {
    width: 55px;
    height: 55px;
    font-size: 1.6rem;
    font-weight: 900;
    background: white;
    border: 2.5px solid #EDE7FF;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition-bounce);
    user-select: none;
}

.letter-tile:hover {
    border-color: var(--blue);
    transform: translateY(-2px) scale(1.05);
}

.letter-tile.selected {
    background: linear-gradient(135deg, var(--blue), #7B68EE);
    color: white;
    border-color: var(--blue);
    box-shadow: 0 4px 16px rgba(77,150,255,0.3);
}

.letter-tile.correct-letter {
    background: linear-gradient(135deg, var(--green), #5AB868);
    color: white;
    border-color: var(--green);
}

.word-slots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.word-slot {
    width: 50px;
    height: 55px;
    border: 2.5px dashed #D5D0E5;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    background: #FAFAFE;
    transition: var(--transition);
}

.word-slot.filled {
    border-style: solid;
    border-color: var(--blue);
    background: white;
}

.word-slot.correct-slot {
    border-color: var(--green);
    background: var(--green-soft);
}

/* ============================================
   Silabe
   ============================================ */
.syllable-btn {
    padding: 14px 24px;
    font-size: 1.3rem;
    font-weight: 900;
    background: white;
    border: 2.5px solid #EDE7FF;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.syllable-btn:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--blue);
}

.syllable-btn.selected {
    background: linear-gradient(135deg, var(--blue), #7B68EE);
    color: white;
    border-color: var(--blue);
}

/* ============================================
   Comparații
   ============================================ */
.compare-display {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.compare-side {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 120px;
    border: 1px solid var(--border-light);
}

.compare-side .number {
    font-size: 3rem;
    font-weight: 900;
}

.compare-sign-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sign-btn {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    font-weight: 900;
    background: white;
    border: 2.5px solid #EDE7FF;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sign-btn:hover {
    border-color: var(--blue);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.sign-btn.correct {
    background: #d4edda !important;
    border-color: #28a745 !important;
    transform: scale(1.15);
}

.sign-btn.wrong {
    background: #f8d7da !important;
    border-color: #dc3545 !important;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .app { padding: 16px 20px; }
    .header-text h1, .brand-logo { font-size: 2.4rem; }
    .mascot-svg { width: 72px; height: 72px; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .game-card { padding: 24px 18px 20px; }
    .game-icon { font-size: 2.8rem; }
    .game-card h2 { font-size: 1.05rem; }
    .letter-display { font-size: 3.5rem; padding: 16px 30px; }
    .drop-target { width: 100px; height: 100px; font-size: 2rem; }
    .seq-item { width: 55px; height: 55px; font-size: 1.5rem; }
    .memory-card { width: 70px; height: 80px; }
    .memory-grid.grid-2x2 { grid-template-columns: repeat(2, 75px); }
    .memory-grid.grid-2x3 { grid-template-columns: repeat(3, 75px); }
    .memory-grid.grid-2x4 { grid-template-columns: repeat(4, 72px); }
    .memory-grid.grid-3x4 { grid-template-columns: repeat(4, 72px); }
    .memory-grid.grid-4x4 { grid-template-columns: repeat(4, 72px); }
    .memory-grid.grid-4x5 { grid-template-columns: repeat(5, 65px); }
    .memory-grid.grid-4x6 { grid-template-columns: repeat(6, 58px); }
    .category-filter { gap: 6px; }
    .cat-btn { padding: 7px 14px; font-size: 0.8rem; }
    .game-header { padding: 8px 0 16px; }
    .game-title { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .app, .game-page { padding: 12px 14px; }
    .header { gap: 14px; padding: 20px 0 12px; }
    .header-text h1, .brand-logo { font-size: 2rem; }
    .mascot-svg { width: 60px; height: 60px; }
    .subtitle { font-size: 1rem; }
    .games-grid { grid-template-columns: 1fr; gap: 14px; }
    .game-header { flex-wrap: wrap; gap: 10px; justify-content: center; }
    .btn-back { padding: 8px 16px; font-size: 0.85rem; }
    .score-display { padding: 6px 14px; font-size: 1rem; }
    .game-instruction { font-size: 1rem; padding: 12px 18px; }
    .equation-display { font-size: 1.8rem; padding: 14px 24px; }
    .option-btn { padding: 14px 20px; font-size: 1.3rem; min-width: 65px; }
    .category-filter { gap: 4px; }
    .cat-btn { padding: 5px 10px; font-size: 0.75rem; }
    .age-btn { padding: 10px 24px; font-size: 0.9rem; }
    .progress-bar-container { padding: 14px 16px; }
    .feedback-content { font-size: 2rem; padding: 24px 40px; }
    .modal-box { padding: 40px 24px 32px; }
    .modal-box h2 { font-size: 1.5rem; }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.game-card:focus-visible,
.age-btn:focus-visible,
.cat-btn:focus-visible,
.option-btn:focus-visible,
.btn-primary:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

::selection {
    background: var(--blue-soft);
    color: var(--text);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D5D0E5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B8B0D0;
}

/* ============================================
   Emoțiile Mele (Emotions Game)
   ============================================ */
.emotii-face {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 4px solid;
    box-shadow: var(--shadow-md);
    animation: bounceIn 0.5s ease;
}
.emotii-face-emoji {
    font-size: 4rem;
}
.emotii-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}
.emotii-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 3px solid var(--border);
    border-radius: 14px;
    background: var(--card-bg);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
}
.emotii-btn:hover:not(:disabled) {
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.emotii-btn-emoji { font-size: 1.5rem; }
.emotii-btn.correct {
    background: var(--green-soft);
    border-color: var(--green);
    box-shadow: 0 0 16px rgba(107,203,119,0.4);
}
.emotii-btn.wrong {
    background: var(--coral-soft);
    border-color: var(--coral);
}
.emotii-scenario {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin: 0 auto 20px;
    max-width: 400px;
    box-shadow: var(--shadow-md);
}
.emotii-scenario-icon { font-size: 3rem; margin-bottom: 8px; }
.emotii-scenario-text {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
}
.emotii-coping {
    background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
    border-left: 4px solid var(--green);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 16px auto 0;
    max-width: 420px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2E7D32;
    animation: fadeIn 0.5s ease;
}

/* ============================================
   Povestea Magică (Story Sequencing)
   ============================================ */
.povesti-slots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}
.povesti-slot {
    width: 130px;
    min-height: 130px;
    border: 3px dashed var(--border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: var(--page-bg);
    padding: 10px;
}
.povesti-slot-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-light);
    opacity: 0.3;
}
.povesti-slot.drag-over {
    border-color: var(--blue);
    background: var(--blue-soft);
    transform: scale(1.05);
}
.povesti-slot.filled {
    border-style: solid;
    border-width: 3px;
}
.povesti-slot.shake {
    animation: shake 0.4s ease;
}
.povesti-slot.hint-flash {
    animation: glow-green 0.8s ease 2;
    border-color: var(--green);
}
.povesti-panels {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.povesti-panel {
    width: 130px;
    padding: 12px;
    background: var(--card-bg);
    border: 3px solid var(--border);
    border-radius: 14px;
    text-align: center;
    cursor: grab;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}
.povesti-panel:hover:not(.placed) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
}
.povesti-panel.selected {
    border-color: var(--blue);
    box-shadow: 0 0 16px rgba(77,150,255,0.5);
    background: var(--blue-soft);
    transform: scale(1.05);
}
.povesti-panel.dragging { opacity: 0.5; }
.povesti-panel.shake-wrong {
    animation: shake 0.4s ease;
    border-color: var(--coral) !important;
}
.povesti-panel.placed {
    cursor: default;
}
.povesti-panel-emoji { font-size: 2rem; margin-bottom: 4px; }
.povesti-panel-text {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}
@media (max-width: 480px) {
    .povesti-slot, .povesti-panel { width: 100px; min-height: 100px; }
    .povesti-panel-text { font-size: 0.65rem; }
}

/* ============================================
   Laboratorul de Culori (Color Mixing)
   ============================================ */
.culori-target {
    text-align: center;
    margin-bottom: 20px;
}
.culori-target-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 6px;
}
.culori-blob {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-size: 2rem;
    animation: bounceIn 0.4s ease;
}
.culori-target-name {
    font-weight: 800;
    font-size: 1.2rem;
}
.culori-mix-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.culori-beaker {
    width: 70px;
    height: 90px;
    border: 3px solid var(--border);
    border-radius: 0 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
    background: var(--page-bg);
    position: relative;
}
.culori-beaker::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -4px;
    right: -4px;
    height: 6px;
    background: var(--border);
    border-radius: 4px 4px 0 0;
}
.culori-beaker-label {
    font-weight: 800;
    font-size: 1.3rem;
}
.culori-plus, .culori-equals {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-light);
}
.culori-result.success-glow {
    animation: bounceIn 0.5s ease;
    box-shadow: var(--shadow-lg);
}
.culori-palette {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.culori-color-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 1.2rem;
}
.culori-color-btn small {
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    margin-top: 2px;
}
.culori-color-btn:hover {
    transform: scale(1.15);
}

/* ============================================
   Corpul Meu (Body Parts)
   ============================================ */
.corp-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}
.corp-body-wrap {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}
.corp-svg {
    width: 280px;
    height: 532px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
}
.body-part {
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
}
.body-part:hover {
    filter: brightness(1.2) saturate(1.3);
}
.bp-correct {
    filter: drop-shadow(0 0 10px rgba(107,203,119,0.9));
    animation: bounceIn 0.4s ease;
}
.bp-wrong {
    animation: shake 0.4s ease;
}
.bp-target {
    animation: pulse-glow 0.7s infinite alternate;
}
@keyframes pulse-glow {
    from { filter: drop-shadow(0 0 6px rgba(77,150,255,0.5)); }
    to   { filter: drop-shadow(0 0 18px rgba(77,150,255,1)); }
}
.corp-panel {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.corp-question {
    background: linear-gradient(135deg, #4D96FF 0%, #8B5CF6 100%);
    color: white;
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: 0 6px 24px rgba(77,150,255,0.35);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.corp-q-label {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.corp-q-emoji {
    font-size: 3.2rem;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}
.corp-q-name {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.corp-hint {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 12px 16px;
    border-radius: 14px;
    border-left: 4px solid var(--blue);
    line-height: 1.4;
}
@media (max-width: 520px) {
    .corp-layout { flex-direction: column; align-items: center; }
    .corp-svg { width: 230px; height: 437px; }
    .corp-q-emoji { font-size: 2.4rem; }
    .corp-q-name { font-size: 1.6rem; }
}

/* ============================================
   Secvențe Logice (Pattern Sequences)
   ============================================ */
.secv-sequence {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.secv-cell {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease both;
}
.secv-cell.secv-number {
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--text);
}
.secv-cell.shape {
    font-size: 2rem;
}
.secv-missing {
    border: 3px dashed var(--blue);
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
    animation: pulse-glow 0.8s infinite alternate;
}
.secv-correct {
    background: var(--green-soft);
    border-color: var(--green);
    animation: bounceIn 0.4s ease;
}
.secv-choices {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.secv-choice-btn {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    border: 3px solid var(--border);
    background: var(--card-bg);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.secv-choice-btn.secv-number {
    font-weight: 900;
    font-size: 1.4rem;
}
.secv-choice-btn:hover:not(:disabled) {
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.secv-choice-btn.correct {
    background: var(--green-soft);
    border-color: var(--green);
    box-shadow: 0 0 16px rgba(107,203,119,0.4);
}
.secv-choice-btn.wrong {
    background: var(--coral-soft);
    border-color: var(--coral);
}

/* Shared animation keyframes */
@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ============================================
   Joc 21 — Rimele Vesele
   ============================================ */
.rime-word-display {
    font-size: 2.5rem;
    font-weight: 800;
    color: #3498DB;
    margin: 1rem 0;
    text-align: center;
}
.rime-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 600px;
    margin: 1.5rem auto;
}
.rime-btn {
    padding: 16px 12px;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.rime-btn:hover:not(:disabled) {
    border-color: #3498DB;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.rime-btn.correct { background: var(--green-soft); border-color: var(--green); }
.rime-btn.wrong { background: var(--coral-soft); border-color: var(--coral); }
.rime-poem {
    background: #EBF5FB;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 500px;
    margin: 1rem auto;
    font-size: 1.15rem;
    line-height: 2;
    text-align: center;
}
.rime-poem .blank {
    display: inline-block;
    min-width: 100px;
    border-bottom: 3px dashed #3498DB;
    color: #3498DB;
    font-weight: 700;
}
.rime-hint {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* ============================================
   Joc 22 — Magazinul Vesel
   ============================================ */
.mag-shelf {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 1rem auto;
    max-width: 600px;
}
.mag-shelf-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 1rem auto;
}
.mag-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 120px;
}
.mag-product-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 3px solid #2ECC71;
    border-radius: 20px;
    padding: 20px 30px;
    box-shadow: var(--shadow-md);
}
.mag-prod-emoji { font-size: 3rem; margin-bottom: 6px; }
.mag-prod-name { font-size: 1.1rem; font-weight: 700; color: #555; margin-top: 4px; }
.mag-prod-price { font-size: 1.2rem; font-weight: 800; color: #27AE60; margin-top: 6px; }
.mag-plus {
    font-size: 2rem;
    font-weight: 800;
    color: #27AE60;
    display: flex;
    align-items: center;
}
.mag-question {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.2rem 0 0.5rem;
    color: #2C3E50;
}
.mag-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 420px;
    margin: 1.2rem auto 0;
}
.mag-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 18px 14px;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.mag-option-btn:hover:not(:disabled) {
    border-color: #2ECC71;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.mag-option-btn .mag-opt-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2C3E50;
}
.mag-option-btn small {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
}
.mag-option-btn.correct {
    background: var(--green-soft);
    border-color: var(--green);
    box-shadow: 0 0 14px rgba(107, 203, 119, 0.4);
}
.mag-option-btn.wrong {
    background: var(--coral-soft);
    border-color: var(--coral);
}
/* Shopping list card */
.mag-shopping-list {
    background: white;
    border: 3px solid #2ECC71;
    border-radius: 20px;
    padding: 20px 24px;
    max-width: 360px;
    margin: 1rem auto;
    box-shadow: var(--shadow-md);
}
.mag-shopping-list h3 {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #2C3E50;
}
.mag-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 1.05rem;
    font-weight: 600;
}
.mag-list-price {
    font-weight: 800;
    color: #27AE60;
}
.mag-list-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #2ECC71;
    font-size: 1.15rem;
    font-weight: 800;
    color: #2C3E50;
}

/* ============================================
   Joc 23 — Codul Secret (Mastermind)
   ============================================ */
.cod-board {
    max-width: 500px;
    margin: 0 auto;
}
.cod-symbols {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.cod-symbol-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 3px solid #ddd;
    font-size: 1.5rem;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'Nunito', sans-serif;
}
.cod-symbol-btn:hover { transform: scale(1.15); border-color: #8E44AD; }
.cod-symbol-btn.active { border-color: #8E44AD; box-shadow: 0 0 10px rgba(142,68,173,0.3); }
.cod-guess-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0.5rem 0;
    align-items: center;
}
.cod-slot {
    width: 48px; height: 48px;
    border-radius: 12px;
    border: 3px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: #FAFAFA;
    cursor: pointer;
    transition: all 0.2s;
}
.cod-slot.filled { border-style: solid; border-color: #8E44AD; background: white; }
.cod-slot.selected { border-color: #E91E63; box-shadow: 0 0 8px rgba(233,30,99,0.3); }
.cod-pins {
    display: flex;
    gap: 4px;
    margin-left: 10px;
}
.cod-pin {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid #999;
}
.cod-pin.exact { background: #2ECC71; border-color: #2ECC71; }
.cod-pin.color { background: #F1C40F; border-color: #F1C40F; }
.cod-pin.miss { background: #eee; }
.cod-pin-exact { background: #2ECC71 !important; }
.cod-pin-color { background: #F1C40F !important; }
.cod-pin-none { background: #ccc !important; }

.tutorial-box {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow-md);
}

/* ============================================
   Vânătoarea de Litere (Whack-a-Mole)
   ============================================ */
.lives-bar {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.hunt-target {
    display: inline-block;
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 8px;
}

.hunt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 380px;
    margin: 0 auto 16px;
}

.hunt-hole {
    aspect-ratio: 1;
    background: linear-gradient(180deg, #C8A060 0%, #A07040 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 6px 18px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.hunt-mole {
    width: 78%;
    height: 78%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(120%);
    transition: transform 0.22s cubic-bezier(.34,1.56,.64,1);
    background: linear-gradient(135deg, #fff 0%, #F0EDFF 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.hunt-mole.up {
    transform: translateY(0);
}

.hunt-mole.hit {
    transform: translateY(0) scale(1.08);
}

.hunt-mole.down {
    transform: translateY(130%);
}

.hunt-mole.miss {
    background: var(--coral-soft);
    transform: translateY(0);
}

.hunt-animal {
    font-size: 1.7rem;
    pointer-events: none;
}

.hunt-letter {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    pointer-events: none;
}

.hunt-correct { font-size: 1.5rem; }
.hunt-wrong { font-size: 1.5rem; }

.hunt-timer-wrap {
    max-width: 380px;
    margin: 0 auto;
    height: 10px;
    background: #EDE7FF;
    border-radius: 5px;
    overflow: hidden;
}

.hunt-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--green), var(--blue));
    border-radius: 5px;
    transition: background 0.5s;
}

@media (max-width: 480px) {
    .hunt-grid { max-width: 300px; gap: 10px; }
    .hunt-animal { font-size: 1.4rem; }
    .hunt-letter { font-size: 0.9rem; }
}

/* ============================================
   Matematică Rapidă (Speed Math Race)
   ============================================ */
.mr-timer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    width: 100%;
    max-width: 500px;
    margin: 0 auto 8px;
}

.mr-timer-label {
    font-size: 1.1rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--text);
    min-width: 72px;
}

.mr-xp-bar {
    flex: 1;
    height: 12px;
    background: #F0EDF5;
    border-radius: 6px;
    overflow: hidden;
}

.mr-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--blue));
    border-radius: 6px;
    transition: width 1s linear, background 0.5s;
    position: relative;
    overflow: hidden;
}

.mr-xp-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

.mr-combo {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--coral);
    text-align: center;
    min-height: 1.6em;
    animation: popIn 0.3s ease-out;
}

.mr-equation {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    background: white;
    padding: 28px 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    letter-spacing: 2px;
    color: var(--text);
    animation: popIn 0.3s ease-out;
}

@media (max-width: 480px) {
    .mr-equation { font-size: 2.2rem; padding: 20px 28px; }
}

/* ============================================
   Lumea Animalelor (Animal Quiz)
   ============================================ */
.anim-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: var(--radius);
    padding: 28px 48px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    animation: bounceIn 0.4s ease-out;
}

.anim-emoji {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.anim-name {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 0.5px;
}

/* ============================================
   Colorează! (Interactive Coloring Game)
   ============================================ */
.col-scene-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.col-scene-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    border: 3px solid var(--border-light);
    background: white;
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-scene-btn:hover, .col-scene-btn.active {
    border-color: var(--blue);
    transform: scale(1.12);
    box-shadow: var(--shadow-md);
}

.col-scene-btn.done {
    border-color: var(--green);
    background: var(--green-soft);
}

.col-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}

.col-swatch {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid white;
    box-shadow: var(--shadow);
    transition: var(--transition-bounce);
}

.col-swatch:hover, .col-swatch.active {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px var(--text), var(--shadow-md);
}

.col-canvas-wrap {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 16px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-canvas-wrap svg {
    max-width: 280px;
    width: 100%;
    cursor: pointer;
}

.col-canvas-wrap svg [data-region]:hover {
    filter: brightness(0.92);
}

.col-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
}

.col-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.col-progress-star {
    font-size: 1.2rem;
    opacity: 0.3;
    transition: var(--transition-bounce);
}

.col-progress-star.done {
    opacity: 1;
    animation: bounceIn 0.4s ease;
}

/* ============================================
   Spânzurătoarea (Hangman)
   ============================================ */
.hang-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.hang-drawing {
    flex-shrink: 0;
}

.hang-panel {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hang-hint {
    font-size: 3rem;
    text-align: center;
    background: white;
    border-radius: var(--radius);
    padding: 18px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    animation: float 3s ease-in-out infinite;
}

.hang-category {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hang-word {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.hang-slot {
    width: 46px;
    height: 52px;
    border-bottom: 3px solid var(--text);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
    transition: var(--transition-bounce);
}

.hang-slot.revealed {
    animation: bounceIn 0.4s ease;
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.hang-slot.wrong-letter {
    color: var(--coral);
    border-bottom-color: var(--coral);
}

.hang-keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    max-width: 340px;
}

.hang-key {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 2px solid #EDE7FF;
    background: white;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hang-key:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.1);
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.hang-key:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.hang-key.hit {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green);
}

.hang-key.miss {
    background: var(--coral-soft);
    border-color: var(--coral);
    color: var(--coral);
}

.hang-lives {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    text-align: center;
}

.hang-key-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.hang-wrong-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--coral);
    text-align: center;
}

.hang-drawing svg {
    width: 160px;
    height: 192px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    border: 1px solid var(--border-light);
}

/* ============================================
   Monetization / Ad Zones
   ============================================ */
.ad-zone {
    width: 100%;
    max-width: 728px;
    margin: 16px auto;
    min-height: 90px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(237,231,255,0.4) 100%);
    border: 2px dashed rgba(196,176,255,0.3);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
}

.premium-banner {
    background: linear-gradient(135deg, #FFD93D 0%, #FF9800 100%);
    border-radius: var(--radius);
    padding: 16px 24px;
    text-align: center;
    margin: 16px 0;
    box-shadow: 0 4px 20px rgba(255,152,0,0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.premium-banner strong {
    font-size: 1.1rem;
    font-weight: 900;
}

.btn-premium {
    background: white;
    color: #FF9800;
    font-weight: 900;
    border: none;
    border-radius: calc(var(--radius) - 4px);
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-bounce);
}

.btn-premium:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: var(--shadow-md);
}

@media (max-width: 480px) {
    .hang-layout { flex-direction: column; align-items: center; }
    .hang-key { width: 38px; height: 38px; font-size: 0.9rem; }
    .hang-slot { width: 38px; height: 46px; font-size: 1.3rem; }
    .hang-drawing svg { width: 130px; height: 160px; }
}

/* ============================================
   Monetization / Ad Zones
   ============================================ */
.ad-zone {
    width: 100%;
    max-width: 728px;
    margin: 16px auto;
    min-height: 90px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(237,231,255,0.4) 100%);
    border: 2px dashed rgba(196,176,255,0.3);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
}

.premium-banner {
    background: linear-gradient(135deg, #FFD93D 0%, #FF9800 100%);
    border-radius: var(--radius);
    padding: 16px 24px;
    text-align: center;
    margin: 16px 0;
    box-shadow: 0 4px 20px rgba(255,152,0,0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.premium-banner strong {
    font-size: 1rem;
    font-weight: 900;
}

.premium-banner .btn-premium {
    padding: 10px 24px;
    background: white;
    color: #E65100;
    border: none;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.premium-banner .btn-premium:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.cod-controls {
    display: flex; justify-content: center; gap: 10px; margin-top: 1rem;
}
.cod-history {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 1rem;
}
.cod-history-row {
    display: flex; justify-content: center; gap: 8px; margin: 6px 0; align-items: center; opacity: 0.7;
}
.cod-history-slot {
    width: 36px; height: 36px; border-radius: 10px; border: 2px solid #ccc;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: white;
}

/* ============================================
   Joc 24 — Harta Comorii
   ============================================ */
.harta-grid {
    display: grid;
    gap: 8px;
    max-width: 400px;
    margin: 1.5rem auto;
}
.harta-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.harta-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.harta-cell {
    aspect-ratio: 1;
    border: 3px solid #e0e0e0;
    border-radius: 14px;
    background: #FAFAFA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
}
.harta-cell:hover { border-color: #F39C12; transform: scale(1.05); }
.harta-cell.treasure-show {
    background: #FFF8E1;
    border-color: #F39C12;
    animation: bounceIn 0.3s;
}
.harta-cell.found {
    background: #E8F5E9;
    border-color: #4CAF50;
}
.harta-cell.wrong-dig {
    background: var(--coral-soft);
    border-color: var(--coral);
    animation: shake 0.3s;
}
.harta-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.harta-timer {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #F39C12;
    margin: 0.5rem 0;
}

/* ============================================
   Joc 25 — Ritmul Magic
   ============================================ */
.ritm-beat-display {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 60px;
    margin: 1rem 0;
    padding: 12px;
    background: #FAFAFA;
    border-radius: 16px;
}
.ritm-beat {
    width: 50px; height: 50px;
    border-radius: 12px;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.2s;
}
.ritm-beat-hit {
    background: var(--green-soft) !important;
    border-color: var(--green) !important;
    animation: bounceIn 0.3s;
}
.ritm-beat-wrong {
    background: var(--coral-soft) !important;
    border-color: var(--coral) !important;
    animation: shake 0.3s;
}
.ritm-pad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 340px;
    margin: 1.5rem auto;
}
.ritm-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    border: 4px solid var(--pad-color, #E91E63);
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.15s;
}
.ritm-pad:hover { transform: scale(1.05); }
.ritm-pad:active, .ritm-pad-active {
    transform: scale(0.92);
    background: color-mix(in srgb, var(--pad-color) 15%, white);
    box-shadow: 0 0 20px color-mix(in srgb, var(--pad-color) 40%, transparent);
}
.ritm-pad-emoji { font-size: 2.5rem; }
.ritm-pad-name { font-size: 0.9rem; font-weight: 700; color: #555; }
.ritm-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 1.5rem;
}

/* ============================================
   Joc 26 — Anotimpurile
   ============================================ */
.anot-question {
    text-align: center;
    margin: 1rem 0;
}
.anot-item-large {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}
.anot-item-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #555;
}
.anot-prompt {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1rem;
}
.anot-quiz-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2C3E50;
    margin: 1.5rem 0;
}
.anot-hint {
    font-size: 0.95rem;
    color: #888;
    margin-top: 0.5rem;
}
.anot-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00897B;
    margin-top: 0.5rem;
}
.anot-season-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    max-width: 450px;
    margin: 1.5rem auto;
}
.anot-season-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
    border: 3px solid transparent;
    border-radius: 18px;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border-color: var(--season-color, #ccc);
}
.anot-season-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.anot-season-emoji { font-size: 2rem; }
.anot-season-btn.anot-correct {
    background: var(--green-soft) !important;
    border-color: var(--green) !important;
    box-shadow: 0 0 16px rgba(107,203,119,0.4);
}
.anot-season-btn.anot-wrong {
    background: var(--coral-soft) !important;
    border-color: var(--coral) !important;
    opacity: 0.5;
}
.anot-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 450px;
    margin: 1rem auto;
}
.anot-item-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.anot-item-btn:hover:not(:disabled) { border-color: #00897B; transform: translateY(-2px); }
.anot-item-emoji { font-size: 2rem; }
.anot-item-label { font-size: 0.8rem; font-weight: 600; color: #666; }
.anot-item-btn.anot-correct {
    background: var(--green-soft); border-color: var(--green);
}
.anot-item-btn.anot-wrong {
    background: var(--coral-soft); border-color: var(--coral); opacity: 0.5;
}

/* ============================================
   Onboarding Overlay (first-visit flow)
   ============================================ */

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4D96FF 0%, #C4B0FF 50%, #FFD93D 100%);
    padding: 20px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.onboarding-overlay.ob-fade-out {
    opacity: 0;
    pointer-events: none;
}

.onboarding-step {
    background: var(--white);
    border-radius: 28px;
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.20);
    animation: ob-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ob-slide-in {
    from { opacity: 0; transform: translateY(30px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ob-mascot {
    margin-bottom: 12px;
    animation: ob-mascot-bounce 2.4s ease-in-out infinite;
}

@keyframes ob-mascot-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.ob-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.15;
}

.ob-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    margin: 0 0 20px;
    line-height: 1.5;
}

.ob-features {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.ob-features li {
    font-size: 0.97rem;
    color: var(--text);
    font-weight: 600;
    background: var(--bg);
    border-radius: 10px;
    padding: 8px 14px;
}

.ob-btn {
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ob-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(77,150,255,0.35); }
.ob-btn:active { transform: scale(0.97); }

.ob-btn-primary {
    background: linear-gradient(135deg, #4D96FF, #6BCB77);
    color: var(--white);
    font-size: 1.1rem;
    padding: 14px 36px;
    box-shadow: 0 6px 18px rgba(77,150,255,0.30);
}

/* Step 2 — age picker */
.ob-question {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 24px;
}

.ob-age-cards {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

.ob-age-card {
    flex: 1;
    max-width: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    border: 3px solid var(--border);
    border-radius: 20px;
    background: var(--bg);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.ob-age-card:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(77,150,255,0.25);
}

.ob-age-card[data-age="3-5"]:hover { border-color: var(--coral); box-shadow: 0 10px 24px rgba(255,107,107,0.25); }
.ob-age-card[data-age="6-8"]:hover { border-color: var(--green); box-shadow: 0 10px 24px rgba(107,203,119,0.25); }

.ob-age-emoji {
    font-size: 2.6rem;
    line-height: 1;
}

.ob-age-label {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text);
}

.ob-age-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 600;
}

.ob-note {
    font-size: 0.82rem;
    color: var(--text-light);
    margin: 0;
}

@media (max-width: 480px) {
    .onboarding-step { padding: 28px 20px; }
    .ob-title        { font-size: 1.5rem; }
    .ob-age-cards    { gap: 10px; }
    .ob-age-card     { padding: 18px 10px; max-width: 140px; }
    .ob-age-emoji    { font-size: 2rem; }
    .ob-age-label    { font-size: 1.1rem; }
}

/* ============================================
   Parental Dashboard
   ============================================ */

.dashboard-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dashboard-btn:hover  { transform: scale(1.1); box-shadow: var(--shadow-md); }
.dashboard-btn:active { transform: scale(0.96); }

.dashboard-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(45,43,61,0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.dashboard-overlay.show { opacity: 1; }

.dashboard-box {
    background: var(--white);
    border-radius: 24px;
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 560px;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: ob-slide-in 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.dashboard-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    margin: 0;
}
.dashboard-close {
    background: var(--bg);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: background 0.15s;
}
.dashboard-close:hover { background: var(--coral-soft); color: var(--coral); }

/* Summary row */
.dashboard-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.dash-stat {
    flex: 1;
    background: var(--bg);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
}
.dash-stat-value {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}
.dash-stat-label {
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category bars */
.dashboard-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 10px;
}
.dash-cat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.dash-cat-label {
    width: 110px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-cat-bar-track {
    flex: 1;
    height: 10px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
}
.dash-cat-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}
.dash-cat-pct {
    width: 36px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
}

/* Per-game grid */
.dash-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}
.dash-game-item {
    background: var(--bg);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.dash-game-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-game-stars {
    font-size: 0.75rem;
    white-space: nowrap;
    letter-spacing: 1px;
}

/* Reset button */
.dash-reset-btn {
    margin-top: 20px;
    width: 100%;
    background: none;
    border: 2px solid var(--coral);
    color: var(--coral);
    border-radius: 50px;
    padding: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dash-reset-btn:hover { background: var(--coral-soft); }

@media (max-width: 480px) {
    .dashboard-box   { padding: 20px 16px; }
    .dashboard-summary { flex-direction: row; }
    .dash-stat-value { font-size: 1.3rem; }
    .dash-games-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
