/* ====== IQ PLATFORM — TIKTOK STYLE ====== */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Nunito:wght@400;600;700;900&display=swap');

:root {
    --gold: #FFD700;
    --gold-dim: #c9a900;
    --blue-neon: #00d4ff;
    --purple-neon: #b94fff;
    --green-neon: #00ff88;
    --red-hot: #ff3366;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255,255,255,0.05);
    --bg-glass: rgba(0,0,0,0.6);
    --text: #ffffff;
    --text-dim: rgba(255,255,255,0.6);
    --border: rgba(255,255,255,0.1);
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ====== USER LAYOUT — MAX 680px ====== */
.user-wrap {
    max-width: 680px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* ====== GAME FULLSCREEN (TikTok style) ====== */
.game-screen {
    position: fixed;
    inset: 0;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.game-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.game-media img,
.game-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.game-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.3) 0%,
            rgba(0,0,0,0.1) 40%,
            rgba(0,0,0,0.7) 70%,
            rgba(0,0,0,0.95) 100%
    );
}
.game-media-none {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0a2e 50%, #0d1a2e 100%);
    z-index: 0;
}
.game-media-none::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            radial-gradient(circle at 20% 20%, rgba(0,212,255,0.08) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(185,79,255,0.08) 0%, transparent 50%);
}

.game-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 60px 20px 20px;
}

/* Progress bar */
.game-progress-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: rgba(255,255,255,0.2);
    z-index: 20;
}
.game-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--blue-neon));
    transition: width 0.4s ease;
}

/* HUD top */
.game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.game-counter {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
}
.game-timer {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 22px;
    color: var(--gold);
    transition: border-color 0.3s, color 0.3s;
}
.game-timer.urgent { border-color: var(--red-hot); color: var(--red-hot); animation: pulse 0.5s infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }

/* Spacer */
.game-spacer { flex: 1; }

/* Question box */
.game-question-box {
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 14px;
}
.game-question-num {
    font-size: 11px;
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.game-question-text {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
}

/* Answer buttons */
.game-answers {
    display: grid;
    gap: 10px;
}
.game-answers.grid-2 { grid-template-columns: 1fr 1fr; }
.game-answers.grid-4 { grid-template-columns: 1fr 1fr; }

.answer-btn {
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.answer-btn:hover, .answer-btn:active { background: rgba(255,255,255,0.2); transform: scale(0.98); }
.answer-btn.selected { border-color: var(--gold); background: rgba(255,215,0,0.2); }
.answer-btn.correct { border-color: var(--green-neon); background: rgba(0,255,136,0.25); color: var(--green-neon); }
.answer-btn.wrong { border-color: var(--red-hot); background: rgba(255,51,102,0.25); color: var(--red-hot); }
.answer-btn:disabled { cursor: not-allowed; }

/* Slide transitions */
.slide-enter { animation: slideIn 0.4s ease forwards; }
.slide-exit { animation: slideOut 0.3s ease forwards; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }

/* ====== HOME PAGE ====== */
.home-hero {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a1a 0%, #0d0d20 100%);
    position: relative;
    overflow: hidden;
}
.home-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 60% 30%, rgba(0,212,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 70%, rgba(185,79,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,20,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 28px;
    background: linear-gradient(135deg, var(--gold), var(--blue-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}
.top-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 900;
    font-size: 14px;
    color: var(--gold);
}

/* User hero card */
.user-hero-card {
    margin: 20px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
}
.user-hero-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(255,215,0,0.12), transparent);
    border-radius: 50%;
}
.user-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--purple-neon));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
}
.user-name { font-size: 20px; font-weight: 900; }
.user-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,215,0,0.15);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    margin-top: 6px;
}
.rating-number {
    font-family: 'Bebas Neue', cursive;
    font-size: 48px;
    color: var(--gold);
    line-height: 1;
    margin-top: 12px;
}
.rating-label { font-size: 12px; color: var(--text-dim); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

/* Game cards */
.section-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--text-dim);
    padding: 20px 20px 12px;
    text-transform: uppercase;
}

.game-cards {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.game-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    min-height: 130px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.game-card:active { transform: scale(0.98); }
.game-card.locked { opacity: 0.7; cursor: not-allowed; }

.game-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.game-card.gold .game-card-bg { background: linear-gradient(135deg, #1a1200, #2d1f00, #1a1200); border: 1px solid rgba(255,215,0,0.3); }
.game-card.blue .game-card-bg { background: linear-gradient(135deg, #001a2d, #002d4a, #001a2d); border: 1px solid rgba(0,212,255,0.3); }
.game-card.purple .game-card-bg { background: linear-gradient(135deg, #1a002d, #2d004a, #1a002d); border: 1px solid rgba(185,79,255,0.3); }

.game-card-glow {
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    filter: blur(30px);
    z-index: 0;
}
.game-card.gold .game-card-glow { background: rgba(255,215,0,0.25); }
.game-card.blue .game-card-glow { background: rgba(0,212,255,0.25); }
.game-card.purple .game-card-glow { background: rgba(185,79,255,0.25); }

.game-card-body {
    position: relative;
    z-index: 2;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.game-card-icon { font-size: 40px; flex-shrink: 0; }
.game-card-info { flex: 1; }
.game-card-title {
    font-size: 17px;
    font-weight: 900;
    margin-bottom: 4px;
}
.game-card.gold .game-card-title { color: var(--gold); }
.game-card.blue .game-card-title { color: var(--blue-neon); }
.game-card.purple .game-card-title { color: var(--purple-neon); }

.game-card-desc { font-size: 13px; color: var(--text-dim); }
.game-card-action {
    font-size: 24px;
    flex-shrink: 0;
    opacity: 0.5;
}
.game-card-locked-text {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.7);
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: var(--red-hot);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Top users */
.top-users-section {
    padding: 0 16px 20px;
}
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    transition: background 0.2s;
}
.leaderboard-item.me {
    background: rgba(255,215,0,0.08);
    border-color: rgba(255,215,0,0.3);
}
.rank-num {
    font-family: 'Bebas Neue', cursive;
    font-size: 20px;
    min-width: 32px;
    text-align: center;
    color: var(--text-dim);
}
.rank-num.gold-rank { color: var(--gold); font-size: 22px; }
.rank-num.silver-rank { color: #c0c0c0; font-size: 21px; }
.rank-num.bronze-rank { color: #cd7f32; font-size: 21px; }
.lb-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-neon), var(--blue-neon));
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.lb-name { font-weight: 700; font-size: 14px; flex: 1; }
.lb-rating { font-family: 'Bebas Neue', cursive; font-size: 18px; color: var(--gold); }

/* ====== NAV BAR ====== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 680px;
    background: rgba(10,10,20,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 200;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-dim);
    padding: 6px 0;
    transition: color 0.2s;
    font-size: 20px;
    -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--gold); }
.nav-item span { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }

/* ====== AUTH PAGES ====== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a1a, #0d0d20, #1a0a2e);
    padding: 20px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 32px;
    backdrop-filter: blur(20px);
}
.auth-logo {
    text-align: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 52px;
    background: linear-gradient(135deg, var(--gold), var(--blue-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: 4px;
}
.auth-subtitle {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 32px;
}
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 14px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}
.form-control:focus { border-color: var(--gold); }
.form-control::placeholder { color: rgba(255,255,255,0.3); }

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 15px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 8px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-dim);
}
.auth-link a { color: var(--gold); font-weight: 700; text-decoration: none; }

.alert-error {
    background: rgba(255,51,102,0.15);
    border: 1px solid rgba(255,51,102,0.4);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--red-hot);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}
.alert-success {
    background: rgba(0,255,136,0.1);
    border: 1px solid rgba(0,255,136,0.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--green-neon);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ====== RESULT PAGE ====== */
.result-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a0a2e 100%);
}
.result-emoji { font-size: 80px; margin-bottom: 16px; animation: bounceIn 0.6s ease; }
@keyframes bounceIn { 0%{transform:scale(0)} 80%{transform:scale(1.1)} 100%{transform:scale(1)} }
.result-title { font-family: 'Bebas Neue', cursive; font-size: 42px; letter-spacing: 3px; }
.result-rating-earned {
    font-family: 'Bebas Neue', cursive;
    font-size: 72px;
    color: var(--gold);
    line-height: 1;
    margin: 16px 0 4px;
}
.result-rating-label { color: var(--text-dim); font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin: 24px 0;
    width: 100%;
    max-width: 360px;
}
.result-stat {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 8px;
}
.result-stat-value { font-family: 'Bebas Neue', cursive; font-size: 30px; color: var(--blue-neon); }
.result-stat-label { font-size: 10px; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.btn-home {
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #000;
    border: none;
    border-radius: 14px;
    padding: 16px 40px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
    transition: transform 0.2s;
}
.btn-home:hover { transform: scale(1.02); color: #000; }

/* ====== CROSSWORD ====== */
.crossword-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
}
.crossword-row {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}
.crossword-cell {
    width: 34px; height: 34px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 16px;
    text-transform: uppercase;
    transition: all 0.3s;
}
.crossword-cell.empty { background: transparent; border: none; }
.crossword-cell.active {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.2);
    cursor: pointer;
}
.crossword-cell.hidden-col {
    background: rgba(255,215,0,0.15);
    border: 1.5px solid rgba(255,215,0,0.5);
    color: var(--gold);
}
.crossword-cell.correct { background: rgba(0,255,136,0.25); border-color: var(--green-neon); color: var(--green-neon); }
.crossword-cell.wrong { background: rgba(255,51,102,0.2); border-color: var(--red-hot); color: var(--red-hot); }
.crossword-cell.num-indicator {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: var(--gold);
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
}

.crossword-input-area {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
}
.crossword-question-text {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}
.crossword-answer-input {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: #fff;
    padding: 12px 16px;
    font-family: 'Bebas Neue', cursive;
    font-size: 20px;
    letter-spacing: 4px;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.2s;
}
.crossword-answer-input:focus { border-color: var(--gold); }

/* ====== PROFILE & LEADERBOARD ====== */
.page-header {
    padding: 20px 20px 0;
}
.page-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 34px;
    letter-spacing: 2px;
}

.stat-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 16px 16px;
}
.stat-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 10px;
    text-align: center;
}
.stat-card-value { font-family: 'Bebas Neue', cursive; font-size: 28px; color: var(--gold); }
.stat-card-label { font-size: 10px; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* Scroll padding for bottom nav */
.page-scroll-content { padding-bottom: 80px; }

/* ====== ADMIN — FULL WIDTH ====== */
.admin-wrap {
    max-width: 100%;
    min-height: 100vh;
    background: #0f0f18;
    color: #e0e0e0;
}
.admin-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 240px;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(20px);
    z-index: 100;
    padding: 20px 0;
    overflow-y: auto;
}
.admin-logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 26px;
    color: var(--gold);
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 2px;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav a.active { color: var(--gold); border-left-color: var(--gold); background: rgba(255,215,0,0.05); }
.admin-main {
    margin-left: 240px;
    padding: 30px;
    min-height: 100vh;
}
.admin-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.admin-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 30px;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 24px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th {
    text-align: left;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.btn-sm {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}
.btn-sm:hover { opacity: 0.85; }
.btn-gold { background: var(--gold); color: #000; }
.btn-red { background: var(--red-hot); color: #fff; }
.btn-blue { background: var(--blue-neon); color: #000; }
.btn-purple { background: var(--purple-neon); color: #fff; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}
.badge-easy { background: rgba(0,255,136,0.15); color: var(--green-neon); border: 1px solid rgba(0,255,136,0.3); }
.badge-medium { background: rgba(255,215,0,0.15); color: var(--gold); border: 1px solid rgba(255,215,0,0.3); }
.badge-hard { background: rgba(255,51,102,0.15); color: var(--red-hot); border: 1px solid rgba(255,51,102,0.3); }

/* Admin forms */
.admin-form-group { margin-bottom: 18px; }
.admin-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.admin-input, .admin-select, .admin-textarea {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 11px 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.admin-input:focus, .admin-select:focus, .admin-textarea:focus { border-color: var(--gold); }
.admin-select option { background: #1a1a2e; }
.admin-textarea { resize: vertical; min-height: 80px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-box-num { font-family: 'Bebas Neue', cursive; font-size: 42px; color: var(--gold); }
.stat-box-label { font-size: 12px; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* Responsive admin */
@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Difficulty bar */
.difficulty-bar { display: flex; gap: 4px; align-items: center; }
.difficulty-dot { width: 8px; height: 8px; border-radius: 50%; }
.diff-easy { background: var(--green-neon); }
.diff-medium { background: var(--gold); }
.diff-hard { background: var(--red-hot); }

/* Notification toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,255,136,0.15);
    border: 1px solid var(--green-neon);
    color: var(--green-neon);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    z-index: 9999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
    max-width: 90vw;
    text-align: center;
    backdrop-filter: blur(20px);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* Pagination */
.pagination-wrap { display: flex; justify-content: center; gap: 8px; padding: 20px; }
.page-link {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}
.page-link:hover, .page-link.active { background: var(--gold); color: #000; border-color: var(--gold); }

/* ====== GAME MEDIA FULLSCREEN ====== */
.game-media-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.game-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.game-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.25) 0%,
            rgba(0,0,0,0.05) 30%,
            rgba(0,0,0,0.55) 65%,
            rgba(0,0,0,0.92) 100%
    );
}

/* ====== BLITZ YES/NO BUTTONS ====== */
.blitz-yes {
    border-color: rgba(0,255,136,0.5) !important;
    background: rgba(0,255,136,0.08) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #fff !important;
    min-height: 70px !important;
}
.blitz-no {
    border-color: rgba(255,51,102,0.5) !important;
    background: rgba(255,51,102,0.08) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #fff !important;
    min-height: 70px !important;
}

/* ====== CROSSWORD CELLS ====== */
.cw-cell {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 15px;
    text-transform: uppercase;
    transition: all 0.25s;
    flex-shrink: 0;
}
.cw-normal {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: #fff;
}
.cw-hidden {
    background: rgba(255,215,0,0.15);
    border: 1.5px solid rgba(255,215,0,0.55);
    color: var(--gold);
}
.cw-correct {
    background: rgba(0,255,136,0.2) !important;
    border-color: var(--green-neon) !important;
    color: var(--green-neon) !important;
}
.cw-wrong {
    background: rgba(255,51,102,0.18) !important;
    border-color: var(--red-hot) !important;
    color: var(--red-hot) !important;
}

/* ====== GAME SCREEN UPDATED ====== */
.game-screen {
    position: fixed;
    inset: 0;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
    background: #000;
}

/* Better question box */
.game-question-box {
    background: rgba(0,0,0,0.58);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 12px;
}
.game-question-text {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

/* Better answer buttons */
.answer-btn {
    background: rgba(10,10,20,0.55);
    border: 1.5px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.answer-btn:hover { background: rgba(255,255,255,0.15); }
.answer-btn.selected { border-color: var(--gold); background: rgba(255,215,0,0.18); }
.answer-btn.correct {
    border-color: var(--green-neon) !important;
    background: rgba(0,255,136,0.22) !important;
    color: var(--green-neon) !important;
}
.answer-btn.wrong {
    border-color: var(--red-hot) !important;
    background: rgba(255,51,102,0.22) !important;
    color: var(--red-hot) !important;
}

/* Timer urgent pulse */
@keyframes timerPulse { 0%,100%{transform:scale(1);box-shadow:0 0 0 rgba(255,51,102,0);} 50%{transform:scale(1.08);box-shadow:0 0 18px rgba(255,51,102,0.5);} }
.game-timer.urgent { animation: timerPulse 0.6s infinite; }
