/* ============================================
   Brick Breaker - 2026 UI/UX Design
   Neon Theme | Dark Mode | Glassmorphism
   ============================================ */

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary, #e74c3c);
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.2s;
    font-size: 14px;
    border-radius: 0 0 4px 0;
}
.skip-link:focus {
    top: 0;
}

:root {
    --primary: #e74c3c;
    --primary-light: #ec6554;
    --secondary: #c0392b;
    --accent: #f39c12;
    --danger: #e74c3c;
    --success: #2ecc71;
    --bg: #0f0f23;
    --bg-light: #1a1a35;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-hover: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text: #f0f0f5;
    --text-sec: #a0a0b8;
    --text-dim: #5a5a70;
    --glass-blur: blur(12px);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* 터치 최적화 */
button, a, input, [role="button"], [role="link"] {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

input[type="text"], textarea {
    -webkit-user-select: text;
    user-select: text;
}

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}

.hidden { display: none !important; }

/* === Game Wrapper === */
.game-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
}

/* === Screens === */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.screen.hidden { display: none; }

/* === Background Grid === */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(231, 76, 60, 0.08) 25%, rgba(231, 76, 60, 0.08) 26%, transparent 27%, transparent 74%, rgba(231, 76, 60, 0.08) 75%, rgba(231, 76, 60, 0.08) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(231, 76, 60, 0.08) 25%, rgba(231, 76, 60, 0.08) 26%, transparent 27%, transparent 74%, rgba(231, 76, 60, 0.08) 75%, rgba(231, 76, 60, 0.08) 76%, transparent 77%, transparent);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* === App Loader === */
.app-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.app-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-emoji {
    font-size: 64px;
    animation: float 2s ease-in-out infinite;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--text-sec);
    font-size: 14px;
    font-weight: 500;
}

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

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

/* === MENU SCREEN === */
.menu-screen {
    justify-content: flex-start;
    overflow-y: auto;
    z-index: 10;
}

.ad-banner {
    min-height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-dim);
}

.ad-top {
    margin-bottom: auto;
}

.menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 30px;
    text-align: center;
}

.game-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-brick {
    font-size: 72px;
    animation: bounce 2s ease-in-out infinite;
}

.game-logo h1 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 14px;
    color: var(--text-sec);
    margin-top: -6px;
}

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

.high-score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius);
    min-width: 200px;
    backdrop-filter: var(--glass-blur);
}

.hs-label {
    font-size: 12px;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hs-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.btn-primary, .btn-secondary, .btn-revive {
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 14px;
}

.menu-hint {
    font-size: 13px;
    color: var(--text-dim);
    max-width: 250px;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    margin-top: 10px;
}

.home-link:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* === GAME SCREEN === */
.game-screen {
    background: var(--bg);
    justify-content: flex-start;
    z-index: 10;
}

.game-hud {
    height: 56px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 16px;
}

.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-right {
    margin-left: auto;
}

.hud-stage, .hud-score, .hud-lives {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.hud-stage {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-score {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.hud-lives {
    font-size: 16px;
}

.hud-pause {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-pause:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hud-pause:active {
    transform: scale(0.95);
}

#game-canvas {
    flex: 1;
    width: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 35, 1), rgba(26, 26, 53, 1));
    display: block;
    touch-action: none;
}

.tap-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    animation: pulse 1.5s ease-in-out infinite;
    z-index: 5;
}

.tap-hint.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* === OVERLAYS === */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.overlay-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 100%;
    width: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: slideUp 0.3s ease-out;
}

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

/* === PAUSE OVERLAY === */
.pause-overlay h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pause-buttons .btn-primary {
    width: 100%;
}

.pause-buttons .btn-secondary {
    width: 100%;
}

/* === GAMEOVER SCREEN === */
.gameover-screen {
    justify-content: flex-start;
    overflow-y: auto;
    z-index: 10;
}

.gameover-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    text-align: center;
}

.go-title {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.go-scores {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%;
}

.go-score-main, .go-score-best {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 8px;
}

.go-label {
    font-size: 12px;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.go-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
}

.go-stage {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: 8px;
    font-size: 12px;
}

.stage-label {
    color: var(--text-sec);
    text-transform: uppercase;
    font-size: 10px;
}

.stage-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
}

.go-new-record {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.go-new-record.hidden {
    display: none;
}

.go-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
}

.btn-revive {
    background: linear-gradient(135deg, var(--success), #27ae60);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-revive:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.revive-icon {
    font-size: 16px;
}

.go-sub-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-share, .btn-menu {
    flex: 1;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    min-height: 40px;
}

.btn-share:hover, .btn-menu:hover {
    background: var(--surface-hover);
}

/* === STATS SCREEN === */
.stats-screen {
    justify-content: flex-start;
    overflow-y: auto;
    z-index: 10;
}

.stats-header {
    height: 56px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.btn-back {
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--surface-hover);
}

.stats-header h2 {
    flex: 1;
    font-size: 18px;
}

.stats-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.stat-label {
    color: var(--text-sec);
    font-size: 13px;
}

.stat-value {
    font-weight: 700;
    color: var(--primary);
}

/* === INTERSTITIAL AD === */
.interstitial-overlay {
    z-index: 150;
}

.interstitial-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 340px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.interstitial-label {
    font-size: 12px;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.interstitial-placeholder {
    min-height: 200px;
    background: rgba(231, 76, 60, 0.05);
    border: 1px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

.interstitial-timer {
    text-align: center;
    font-size: 13px;
    color: var(--text-sec);
}

#ad-countdown {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.btn-close-ad {
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close-ad:hover {
    background: var(--secondary);
}

.btn-close-ad.hidden {
    display: none;
}

/* === RECOMMENDATIONS === */
.recommendations-section {
    padding: 30px 20px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.rec-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.rec-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    cursor: pointer;
}

.rec-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.rec-icon {
    font-size: 32px;
}

.rec-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.rec-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* === FOOTER === */
.game-footer {
    padding: 12px 20px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--transition);
}

.back-link:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* === LANGUAGE SELECTOR === */
.language-selector {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1000;
}

.lang-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 160px;
    overflow-y: auto;
    max-height: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-menu.hidden {
    display: none;
}

.lang-option {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--surface);
}

.lang-option.active {
    background: var(--surface);
    color: var(--primary);
    font-weight: 600;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .game-logo h1 {
        font-size: 28px;
    }

    .logo-brick {
        font-size: 56px;
    }

    .go-scores {
        flex-direction: column;
        gap: 12px;
    }

    .go-sub-buttons {
        flex-direction: column;
    }

    .btn-share, .btn-menu {
        width: 100%;
    }

    .rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark, var(--bg-primary, var(--background, #0f0f23)));
}

::-webkit-scrollbar-thumb {
    background: #ff5722;
    border-radius: 5px;
    border: 2px solid var(--bg-dark, var(--bg-primary, var(--background, #0f0f23)));
}

::-webkit-scrollbar-thumb:hover {
    background: #ff784e;
    opacity: 0.8;
}

/* Selection Color */
::selection {
    background: #ff5722;
    color: white;
}

::-moz-selection {
    background: #ff5722;
    color: white;
}

@media (max-width: 320px) {
    .game-logo h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .hud-pause {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .btn-primary, .btn-secondary {
        font-size: 14px;
        padding: 12px 16px;
    }

    .rec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Light Mode */
[data-theme="light"] {
    --bg: #f5f5fa;
    --bg-light: #ffffff;
    --surface: rgba(231, 76, 60, 0.05);
    --surface-hover: rgba(231, 76, 60, 0.1);
    --border: rgba(231, 76, 60, 0.15);
    --border-hover: rgba(231, 76, 60, 0.25);
    --text: #1a1a2e;
    --text-sec: #5a5a70;
    --text-dim: #8a8a9e;
}

[data-theme="light"] body {
    background: var(--bg);
}

[data-theme="light"] .bg-grid {
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(231, 76, 60, 0.04) 25%, rgba(231, 76, 60, 0.04) 26%, transparent 27%, transparent 74%, rgba(231, 76, 60, 0.04) 75%, rgba(231, 76, 60, 0.04) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(231, 76, 60, 0.04) 25%, rgba(231, 76, 60, 0.04) 26%, transparent 27%, transparent 74%, rgba(231, 76, 60, 0.04) 75%, rgba(231, 76, 60, 0.04) 76%, transparent 77%, transparent);
}

[data-theme="light"] .app-loader {
    background: var(--bg);
}

[data-theme="light"] .menu-screen {
    background: var(--bg);
}

[data-theme="light"] .ad-banner {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="light"] .high-score-display {
    background: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.15);
}

[data-theme="light"] .btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
}

[data-theme="light"] .game-screen {
    background: var(--bg);
}

[data-theme="light"] .game-hud {
    background: rgba(255, 255, 255, 0.5);
    border-bottom-color: var(--border);
}

[data-theme="light"] #game-canvas {
    background: linear-gradient(135deg, rgba(245, 245, 250, 0.9), rgba(255, 255, 255, 0.9));
}

[data-theme="light"] .overlay {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .overlay-card {
    background: var(--bg-light);
    border-color: var(--border);
}

[data-theme="light"] .gameover-screen {
    background: var(--bg);
}

[data-theme="light"] .go-score-main,
[data-theme="light"] .go-score-best {
    background: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.15);
}

[data-theme="light"] .go-stage {
    background: var(--surface);
}

[data-theme="light"] .btn-share,
[data-theme="light"] .btn-menu {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .btn-share:hover,
[data-theme="light"] .btn-menu:hover {
    background: var(--surface-hover);
}

[data-theme="light"] .stats-screen {
    background: var(--bg);
}

[data-theme="light"] .stats-header {
    background: rgba(255, 255, 255, 0.5);
    border-bottom-color: var(--border);
}

[data-theme="light"] .stat-item {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="light"] .interstitial-card {
    background: var(--bg-light);
    border-color: var(--border);
}

[data-theme="light"] .recommendations-section {
    background: var(--bg);
    border-top-color: var(--border);
}

[data-theme="light"] .rec-card {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="light"] .rec-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
}

[data-theme="light"] .game-footer {
    background: var(--bg);
    border-top-color: var(--border);
}

[data-theme="light"] .lang-menu {
    background: var(--bg-light);
    border-color: var(--border);
}

[data-theme="light"] .lang-option {
    color: var(--text);
    border-bottom-color: var(--border);
}

[data-theme="light"] .lang-option:hover {
    background: var(--surface);
}

[data-theme="light"] .lang-option.active {
    background: var(--surface);
    color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 12px;
    right: 56px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.theme-toggle:active {
    transform: scale(0.95);
}

[data-theme="light"] .theme-toggle {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.2);
    color: var(--text);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(231, 76, 60, 0.15);
}

/* Focus Visible - Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid #e74c3c;
    outline-offset: 2px;
}

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