/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #0b0e17;
    --bg-card: rgba(15, 22, 40, 0.9);
    --bg-card-hover: rgba(20, 30, 55, 0.95);
    --rl-blue: #1e90ff;
    --rl-blue-light: #4db8ff;
    --rl-orange: #ff8c00;
    --rl-orange-light: #ffaa33;
    --cyan: var(--rl-blue-light);
    --magenta: var(--rl-orange);
    --green: #00ff88;
    --red: #ff3366;
    --yellow: #ffcc00;
    --orange: var(--rl-orange);
    --text: #e8ecf4;
    --text-dim: #7788aa;
    --border: rgba(255, 255, 255, 0.08);
    --glow-cyan: 0 0 20px rgba(30, 144, 255, 0.4);
    --glow-magenta: 0 0 20px rgba(255, 140, 0, 0.4);
    --glow-green: 0 0 20px rgba(0, 255, 136, 0.3);
    --glow-orange: 0 0 20px rgba(255, 140, 0, 0.4);
    --glow-blue: 0 0 20px rgba(30, 144, 255, 0.4);
}

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

#bubbles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === SCREENS === */
.screen {
    display: none;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}
.screen.active { display: block; }

/* === LOGO === */
.logo-container {
    text-align: center;
    padding: 40px 0 10px;
}
.presents-line {
    font-size: 0.65rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
    opacity: 0.6;
}
.logo-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--rl-blue-light);
    text-shadow: 0 0 30px rgba(30, 144, 255, 0.5);
}
.logo-title .accent {
    color: var(--rl-orange);
    text-shadow: 0 0 40px rgba(255, 140, 0, 0.7);
}
.logo-subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-top: 8px;
    letter-spacing: 2px;
}

/* === STATS BAR === */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0 10px;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: var(--glow-cyan);
}

/* === XP BAR === */
.xp-bar-container {
    width: 80%;
    max-width: 400px;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin: 5px auto 30px;
    overflow: hidden;
}
.xp-bar-container.large {
    width: 100%;
    height: 10px;
    margin: 10px 0;
}
.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rl-blue), var(--rl-orange));
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
}

/* === MODE GRID === */
.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 10px;
}
.mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.mode-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,240,255,0.05), transparent);
    transition: left 0.5s ease;
}
.mode-card:hover::before { left: 100%; }
.mode-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-4px);
}
.mode-card:active { transform: translateY(-2px) scale(0.98); }
.mode-icon { font-size: 2.5rem; margin-bottom: 12px; }
.mode-card h2 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text);
}
.mode-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* === BUTTONS === */
.btn-stats {
    display: block;
    width: calc(100% - 20px);
    margin: 20px 10px;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-stats:hover {
    border-color: var(--magenta);
    color: var(--magenta);
    box-shadow: var(--glow-magenta);
}
.btn-back {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px 0;
    transition: color 0.3s;
}
.btn-back:hover { color: var(--cyan); }
.btn-primary {
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--rl-orange), #ff6600);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow-orange);
}
.btn-primary:hover { transform: scale(1.05); filter: brightness(1.1); }
.btn-secondary {
    padding: 14px 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-secondary:hover { border-color: var(--text); color: var(--text); }

/* === SECTION TITLE === */
.section-title {
    font-size: 1.5rem;
    margin: 20px 0 16px;
    color: var(--text);
}

/* === CATEGORY GRID === */
.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
}
.category-card:hover {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
    transform: translateX(8px);
}
.category-icon { font-size: 2rem; }
.category-info { flex: 1; }
.category-info h3 { font-size: 1rem; margin-bottom: 4px; }
.category-info p { font-size: 0.8rem; color: var(--text-dim); }
.category-badge {
    background: rgba(0,240,255,0.1);
    color: var(--cyan);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.category-badge.complete {
    background: rgba(0,255,136,0.1);
    color: var(--green);
}

/* === GAME SCREEN === */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 8px;
}
.game-stat {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: 600;
}
.game-stat span { color: var(--cyan); }
.streak-display span {
    color: var(--orange);
    text-shadow: 0 0 10px rgba(255,136,0,0.5);
}
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    margin: 8px 0 20px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* === QUESTION CARD === */
.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px 24px;
    backdrop-filter: blur(10px);
    animation: slideUp 0.4s ease;
}
.question-image-container {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 16px;
}
.question-image-container img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}
.question-text {
    font-size: 1.2rem;
    margin-bottom: 24px;
    line-height: 1.5;
    color: var(--text);
}
.answers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.answer-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}
.answer-btn:hover:not(.disabled) {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--cyan);
    transform: translateX(6px);
}
.answer-btn .answer-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dim);
    flex-shrink: 0;
}
.answer-btn.correct {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--green);
    box-shadow: var(--glow-green);
}
.answer-btn.correct .answer-letter {
    background: var(--green);
    color: #000;
}
.answer-btn.wrong {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--red);
    animation: shake 0.5s ease;
}
.answer-btn.wrong .answer-letter {
    background: var(--red);
    color: #fff;
}
.answer-btn.disabled { pointer-events: none; opacity: 0.5; }
.answer-btn.correct.disabled { opacity: 1; }
.answer-btn.wrong.disabled { opacity: 1; }

/* === RESULT SCREEN === */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    margin-top: 40px;
    animation: scaleIn 0.5s ease;
}
.result-title {
    font-size: 2rem;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--rl-blue-light), var(--rl-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.result-stat { text-align: center; }
.result-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cyan);
}
.result-stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}
.result-achievements { margin-bottom: 20px; }
.result-time {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.result-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* === STATS SCREEN === */
.stats-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(10px);
}
.stats-card h3 {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.stats-card h3 span { color: var(--cyan); font-size: 1.3rem; }
.big-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: var(--glow-cyan);
}
.category-progress-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 30px;
}
.cat-progress-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
}
.cat-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.cat-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}
.cat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* === ACHIEVEMENTS === */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}
.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}
.achievement-card.unlocked {
    border-color: var(--yellow);
    box-shadow: 0 0 15px rgba(255,204,0,0.15);
}
.achievement-card.locked { opacity: 0.4; }
.achievement-card .ach-icon { font-size: 2rem; margin-bottom: 8px; }
.achievement-card .ach-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.achievement-card .ach-desc {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* === OVERLAYS === */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.levelup-content {
    text-align: center;
    position: relative;
}
.levelup-content h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--rl-blue-light), var(--rl-orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 0.5s ease infinite alternate;
}
.levelup-number {
    font-size: 6rem;
    font-weight: 900;
    color: var(--rl-orange);
    text-shadow: 0 0 60px rgba(255,140,0,0.6);
}
#confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 101;
}

/* === ACHIEVEMENT POPUP === */
.achievement-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--yellow);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 200;
    box-shadow: 0 0 30px rgba(255,204,0,0.2);
    animation: slideInRight 0.5s ease, fadeOut 0.5s ease 2.5s forwards;
}
.achievement-icon { font-size: 1.8rem; }
.achievement-label {
    display: block;
    font-size: 0.7rem;
    color: var(--yellow);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.achievement-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
}

/* === DANGER ZONE === */
.danger-zone {
    text-align: center;
    margin: 40px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.btn-reset {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--red);
    border-radius: 10px;
    color: var(--red);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-reset:hover {
    background: rgba(255,51,102,0.1);
    box-shadow: 0 0 15px rgba(255,51,102,0.2);
}

/* === ANIMATIONS === */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes xpFloat {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-60px); }
}
.xp-float {
    position: absolute;
    color: var(--green);
    font-weight: 700;
    font-size: 1.2rem;
    animation: xpFloat 1s ease forwards;
    pointer-events: none;
    text-shadow: var(--glow-green);
    z-index: 50;
}

/* === QUICK CHAT === */
.quick-chat {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 95;
    pointer-events: none;
    white-space: nowrap;
    animation: quickChatPop 1.2s ease forwards;
    text-shadow: 0 0 30px currentColor, 0 2px 10px rgba(0,0,0,0.8);
}
.quick-chat.correct {
    color: var(--rl-orange-light);
}
.quick-chat.wrong {
    color: var(--rl-blue-light);
}
@keyframes quickChatPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(1); }
    75% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -60%) scale(0.8); opacity: 0; }
}

/* === BOOST METER === */
.boost-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}
.boost-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
}
.boost-ring svg {
    transform: rotate(-90deg);
    width: 80px;
    height: 80px;
}
.boost-ring .boost-bg {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 6;
}
.boost-ring .boost-fill {
    fill: none;
    stroke: var(--rl-orange);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    transition: stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0 0 6px rgba(255,140,0,0.5));
}
.boost-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--rl-orange);
    text-shadow: 0 0 10px rgba(255,140,0,0.4);
}
.boost-label {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* === RANK DISPLAY === */
.rank-display {
    text-align: center;
    margin-bottom: 6px;
}
.rank-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.rank-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 4px;
}

/* === RANK UP OVERLAY === */
.rankup-content {
    text-align: center;
}
.rankup-content h1 {
    font-size: 2rem;
    color: var(--rl-orange-light);
    text-shadow: 0 0 30px rgba(255,140,0,0.6);
    margin-bottom: 10px;
    animation: pulse 0.5s ease infinite alternate;
}
.rankup-rank {
    font-size: 3rem;
    margin-bottom: 8px;
}
.rankup-name {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
}

/* === PROFILES === */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    padding: 0 10px;
    margin-bottom: 16px;
}
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.profile-card:hover {
    border-color: var(--rl-orange);
    box-shadow: var(--glow-orange);
    transform: translateY(-4px);
}
.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
}
.profile-card .profile-card-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.profile-card .profile-card-rank {
    font-size: 0.75rem;
    color: var(--text-dim);
}
.btn-create-profile {
    display: block;
    width: calc(100% - 20px);
    margin: 0 10px 20px;
    padding: 14px;
    background: transparent;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 14px;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-create-profile:hover {
    border-color: var(--rl-orange);
    color: var(--rl-orange);
}

/* === CREATE PROFILE === */
.create-profile-card {
    max-width: 340px;
    margin: 20px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
}
.avatar-upload {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 3px dashed rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
    position: relative;
    background: rgba(255,255,255,0.03);
}
.avatar-upload:hover { border-color: var(--rl-orange); }
.avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}
.avatar-placeholder { font-size: 2.5rem; }
.avatar-hint {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 4px;
}
.profile-name-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1.1rem;
    text-align: center;
    outline: none;
    margin-top: 10px;
    transition: border-color 0.3s;
}
.profile-name-input:focus { border-color: var(--rl-blue); }
.profile-name-input::placeholder { color: var(--text-dim); }

/* === HOME TOP BAR === */
.home-top-bar {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
}
.current-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.95rem;
}
.current-player:hover {
    border-color: var(--rl-blue);
}
.mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
}
.switch-hint {
    color: var(--text-dim);
    font-size: 1.1rem;
}
.no-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* === LEADERBOARD === */
.leaderboard-section {
    margin-top: 20px;
    padding: 0 10px;
}
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}
.lb-row.me {
    border-color: var(--rl-orange);
    box-shadow: 0 0 10px rgba(255,140,0,0.15);
}
.lb-pos {
    font-size: 1.1rem;
    font-weight: 900;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.lb-pos.gold { color: #ffd700; }
.lb-pos.silver { color: #c0c0c0; }
.lb-pos.bronze { color: #cd7f32; }
.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}
.lb-info { flex: 1; }
.lb-name { font-weight: 600; font-size: 0.95rem; }
.lb-rank { font-size: 0.7rem; color: var(--text-dim); }
.lb-xp {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--rl-orange);
}

/* === RESULT LEADERBOARD MSG === */
.result-leaderboard-msg {
    margin: 16px 0;
    padding: 14px 20px;
    background: rgba(255,140,0,0.08);
    border: 1px solid rgba(255,140,0,0.2);
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--rl-orange-light);
    text-align: center;
}
.result-leaderboard-msg:empty { display: none; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .logo-title { font-size: 2.5rem; }
    .mode-grid { grid-template-columns: 1fr; }
    .result-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .stats-overview { grid-template-columns: 1fr; }
    .question-card { padding: 20px 16px; }
    .result-card { padding: 30px 16px; }
}
