/**
 * Typing Master Game - Complete Styles
 * 
 * Features:
 * - Dark/Light Mode Support
 * - Mobile-first responsive design
 * - Kid-friendly colors and animations
 * - Accessible components
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Primary Colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;

    /* Secondary Colors */
    --color-secondary: #f472b6;
    --color-secondary-dark: #ec4899;

    /* Success/Error */
    --color-success: #22c55e;
    --color-success-light: #86efac;
    --color-success-bg: #dcfce7;
    --color-error: #f87171;
    --color-error-bg: #fee2e2;

    /* Light Mode Colors */
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-fun: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-nature: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);

    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Monaco', 'Consolas', monospace;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --color-success-bg: rgba(34, 197, 94, 0.2);
    --color-error-bg: rgba(248, 113, 113, 0.2);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-6);
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    min-height: 48px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    min-height: 40px;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.125rem;
    min-height: 56px;
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 45px -10px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

.btn-white {
    background: white;
    color: var(--color-primary);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--color-primary);
}

.btn-white-pink {
    background: white;
    color: var(--color-secondary-dark);
}

.btn-white-pink:hover {
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-nature);
    color: white;
}

.btn-fun {
    background: var(--gradient-fun);
    color: white;
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-4) 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav {
    display: none;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: white;
}

.mobile-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }

    .mobile-controls {
        display: none;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: var(--gradient-hero);
    padding: var(--space-16) 0 var(--space-16);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding-top: var(--space-16);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: var(--space-4);
    line-height: 1.1;
}

.hero-emoji {
    display: inline-block;
    animation: bounce 2s infinite;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Keyboard Visual */
.keyboard-visual {
    margin-top: var(--space-12);
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.key {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: float 3s ease-in-out infinite;
}

.key:nth-child(1) {
    animation-delay: 0s;
}

.key:nth-child(2) {
    animation-delay: 0.2s;
}

.key:nth-child(3) {
    animation-delay: 0.4s;
}

.key:nth-child(4) {
    animation-delay: 0.6s;
}

.key:nth-child(5) {
    animation-delay: 0.8s;
}

.key:nth-child(6) {
    animation-delay: 1s;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-16) 0;
}

.section-title {
    text-align: center;
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-12);
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
    background: var(--bg-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-card {
    text-align: center;
    padding: var(--space-8);
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base);
}

.step-card:hover {
    transform: translateY(-4px);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-hero);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 auto var(--space-4);
}

.step-icon {
    font-size: 2.25rem;
    margin-bottom: var(--space-4);
    display: block;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.step-desc {
    color: var(--text-secondary);
}

/* ============================================
   BENEFITS
   ============================================ */
.benefits {
    background: var(--bg-primary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.benefit-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.benefit-icon {
    font-size: 2.25rem;
    margin-bottom: var(--space-4);
    display: block;
}

.benefit-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.benefit-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   AUDIENCE TABS
   ============================================ */
.audience-tabs {
    background: var(--bg-secondary);
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.tab-button {
    padding: var(--space-3) var(--space-6);
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.tab-button:hover {
    background: var(--border-color);
}

.tab-button.active {
    background: var(--gradient-hero);
    color: white;
}

.tab-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-panel.active {
    display: block;
}

.tab-emoji {
    font-size: 3.75rem;
    margin-bottom: var(--space-4);
    display: block;
}

.tab-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.tab-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    background: var(--bg-primary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta {
    background: var(--gradient-fun);
    padding: var(--space-16) 0;
    text-align: center;
}

.cta-content {
    color: white;
}

.cta-title {
    font-size: 1.875rem;
    margin-bottom: var(--space-4);
    color: white;
}

.cta-desc {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .cta-title {
        font-size: 2.25rem;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #111827;
    color: #9ca3af;
    padding: var(--space-12) 0 var(--space-8);
}

[data-theme="dark"] .footer {
    background: #020617;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-4);
}

.footer-desc {
    color: #9ca3af;
    line-height: 1.7;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid #374151;
    font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ============================================
   GAME PAGE STYLES
   ============================================ */
.game-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.game-header {
    background: var(--gradient-hero);
    padding: var(--space-4) 0;
    box-shadow: var(--shadow-md);
}

.game-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: white;
    opacity: 0.9;
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.back-button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.sound-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Game Container */
.game-container {
    flex: 1;
    padding: var(--space-6) 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-wrapper {
    width: 100%;
    max-width: 900px;
}

/* Mode Selection */
.mode-selection {
    text-align: center;
}

.mode-title {
    font-size: 1.875rem;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.mode-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

.difficulty-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .difficulty-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.difficulty-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.difficulty-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.difficulty-card.active {
    border-color: var(--color-primary);
}

.difficulty-card.easy.active {
    border-color: #22c55e;
}

.difficulty-card.medium.active {
    border-color: #f59e0b;
}

.difficulty-card.hard.active {
    border-color: #ef4444;
}

.difficulty-icon {
    font-size: 2.25rem;
    display: block;
    margin-bottom: var(--space-3);
}

.difficulty-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.difficulty-card.easy .difficulty-name {
    color: #22c55e;
}

.difficulty-card.medium .difficulty-name {
    color: #f59e0b;
}

.difficulty-card.hard .difficulty-name {
    color: #ef4444;
}

.difficulty-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.mode-button {
    padding: var(--space-3) var(--space-6);
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.mode-button:hover {
    background: var(--border-color);
}

.mode-button.active {
    background: var(--gradient-hero);
    color: white;
}

/* Game Area */
.game-area {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.stat-item {
    text-align: center;
    min-width: 80px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timer {
    background: var(--gradient-fun);
    color: white;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-xl);
    font-size: 1.25rem;
    font-weight: 700;
}

.timer.warning {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    animation: pulse 0.5s infinite;
}

/* Typing Area */
.typing-area {
    margin-bottom: var(--space-6);
}

.target-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    line-height: 2;
    background: var(--bg-primary);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-4);
    min-height: 100px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 2px;
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .target-text {
        font-size: 1.875rem;
    }
}

.char {
    display: inline-block;
    padding: 2px 1px;
    border-radius: 2px;
    transition: all 0.1s ease;
}

.char.correct {
    color: #16a34a;
    background-color: var(--color-success-bg);
}

.char.incorrect {
    color: #dc2626;
    background-color: var(--color-error-bg);
    text-decoration: underline;
    text-decoration-color: #dc2626;
}

.char.current {
    background-color: var(--color-primary);
    color: white;
    animation: pulse 1s infinite;
}

.char.pending {
    color: var(--text-muted);
}

.typing-prompt {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    padding: var(--space-4);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.typing-prompt:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.typing-prompt.active {
    border-color: var(--color-success);
    background: var(--color-success-bg);
    color: var(--color-success);
}

.hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.progress-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-4);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-nature);
    transition: width var(--transition-fast);
    border-radius: var(--radius-full);
}

.keyboard-hint {
    display: none;
    text-align: center;
    margin-top: var(--space-4);
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .keyboard-hint {
        display: block;
    }
}

/* Results Screen */
.results-screen {
    text-align: center;
    padding: var(--space-8);
}

.results-emoji {
    font-size: 5rem;
    display: block;
    margin-bottom: var(--space-4);
    animation: bounce 1s infinite;
}

.results-title {
    font-size: 1.875rem;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.results-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

.stars {
    font-size: 2.25rem;
    margin-bottom: var(--space-8);
    letter-spacing: 8px;
}

.star {
    display: inline-block;
    animation: pop 0.3s ease-out forwards;
    opacity: 0;
}

.star:nth-child(1) {
    animation-delay: 0.1s;
}

.star:nth-child(2) {
    animation-delay: 0.2s;
}

.star:nth-child(3) {
    animation-delay: 0.3s;
}

.star:nth-child(4) {
    animation-delay: 0.4s;
}

.star:nth-child(5) {
    animation-delay: 0.5s;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .result-stats {
        grid-template-columns: repeat(4, 1fr);
        max-width: 600px;
    }
}

.result-stat-card {
    background: var(--bg-primary);
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.result-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.result-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 300px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .result-actions {
        flex-direction: row;
        max-width: none;
        justify-content: center;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background-color: var(--color-primary-light);
    color: white;
}