/* public/css/style.css: KUIZ Modern Premium UI/UX stylesheet */

/* ==========================================================================
   1. DESIGN SYSTEM VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-dark: #07080d;
    --bg-surface: rgba(18, 20, 36, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(124, 58, 237, 0.5);
    
    /* Neon gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-gray: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    
    /* Solid Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-primary: #a78bfa;
    --text-secondary: #22d3ee;
    
    /* Shadows & Glows */
    --glow-primary: 0 0 20px rgba(139, 92, 246, 0.4);
    --glow-secondary: 0 0 20px rgba(6, 182, 212, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   2. LAYOUT & INTERACTIVE BACKGROUND
   ========================================================================== */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(20, 10, 48, 0.6) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(10, 42, 64, 0.6) 0px, transparent 50%);
}

.bg-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
    mix-blend-mode: screen;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 15%;
    left: -50px;
    animation: float-orb 15s infinite alternate ease-in-out;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: #06b6d4;
    bottom: 10%;
    right: -100px;
    animation: float-orb 18s infinite alternate-reverse ease-in-out;
}

@keyframes float-orb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.15); }
}

.app-container {
    width: 100%;
    max-width: 480px; /* Locked mobile width on desktop */
    min-height: 100vh;
    padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom) 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(180deg, rgba(7, 8, 13, 0.3) 0%, rgba(7, 8, 13, 0.95) 100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.app-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(139, 92, 246, 0.1);
}

/* ==========================================================================
   3. COMPONENTS & FORM CONTROLS
   ========================================================================== */
.card {
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    width: 100%;
    margin-bottom: 20px;
}

.glassmorphism {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

input[type="text"],
input[type="number"] {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-fast);
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
    background: rgba(0, 0, 0, 0.5);
}

.form-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* Buttons style */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 14px 24px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
    outline: none;
    min-height: 48px; /* Safe tap target */
}

.btn-large {
    width: 100%;
    padding: 16px 28px;
    font-size: 1.15rem;
}

.btn-small {
    padding: 10px 16px;
    font-size: 0.9rem;
    min-height: 40px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: var(--glow-primary);
}

.btn-primary:active {
    transform: scale(0.97);
    filter: brightness(0.9);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: #ffffff;
    box-shadow: var(--glow-secondary);
}

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

.btn-tertiary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-tertiary:active {
    background: rgba(255, 255, 255, 0.15);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    outline: none;
}

.btn-icon:active {
    background: rgba(255, 255, 255, 0.12);
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    align-self: flex-start;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom Alert Banner Modals */
.hidden {
    display: none !important;
}

/* ==========================================================================
   4. SCREENS CONFIGURATION (HOME, CREATE, LOBBY)
   ========================================================================== */
.game-screen {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    animation: screen-fade-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-screen.active {
    display: flex;
}

@keyframes screen-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-section {
    text-align: center;
    margin: 12px 0 24px 0;
}

.tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* Avatar selection grid */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.avatar-opt {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    font-size: 1.8rem;
    padding: 10px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.avatar-opt:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar-opt.selected {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--text-primary);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
    transform: scale(1.08);
}

.footer-actions {
    margin-top: auto;
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

/* Create Partida Screen */
.screen-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 4px;
}

.category-opt {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition-normal);
    outline: none;
    text-align: center;
}

.category-opt .cat-icon {
    font-size: 2.2rem;
    transition: var(--transition-fast);
}

.category-opt .cat-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.category-opt.selected {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--text-primary);
    box-shadow: var(--glow-primary);
}

.category-opt.selected .cat-icon {
    transform: scale(1.15) rotate(5deg);
}

.select-sub .category-opt {
    padding: 12px;
    flex-direction: row;
    gap: 12px;
    justify-content: flex-start;
}

.select-sub .category-opt .cat-icon {
    font-size: 1.5rem;
}

/* Question count selector selector */
.count-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.count-opt {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 12px 0;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}

.count-opt.selected {
    background: var(--gradient-secondary);
    border-color: var(--text-secondary);
    box-shadow: var(--glow-secondary);
}

/* Lobby Screen */
.lobby-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.lobby-badge {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
    border: 1px solid rgba(139, 92, 246, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
}

.room-code-panel {
    text-align: center;
}

.room-code-panel small {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 700;
}

.room-code {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 4px;
    text-shadow: 0 4px 15px rgba(255,255,255,0.15);
}

.lobby-share-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.share-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.qr-container {
    background: #ffffff;
    padding: 12px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    animation: scale-up 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scale-up {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#qr-canvas {
    width: 180px !important;
    height: 180px !important;
}

/* Roster list */
.roster-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.roster-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roster-meta h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}

.status-pulse {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-pulse::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    margin-left: 6px;
    box-shadow: 0 0 8px var(--text-secondary);
    animation: flash 1s infinite alternate ease-in-out;
}

@keyframes flash {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.player-roster {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 240px;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.02);
    animation: player-entry 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.player-row.offline {
    opacity: 0.5;
}

.player-row.offline .player-nick::after {
    content: ' (Desconectado)';
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

@keyframes player-entry {
    from { transform: translateX(-15px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    font-size: 1.5rem;
}

.player-nick {
    font-weight: 500;
}

.player-role {
    font-size: 1.2rem;
}

.lobby-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guest-msg-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brain-pulse {
    font-size: 2.2rem;
    animation: float 2.5s infinite ease-in-out;
}

.guest-msg-panel p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

/* ==========================================================================
   5. DIALOGS & OVERLAYS (MODALS & HOW TO PLAY DRAWER)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    background: rgba(7, 8, 13, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fade-in 0.2s ease-out;
}

.modal-card {
    max-width: 380px;
    width: 100%;
    animation: scale-up 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

#modal-title-icon {
    font-size: 1.8rem;
}

.modal-body {
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

/* How to play drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 90;
    background: rgba(7, 8, 13, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: fade-in 0.2s ease-out;
}

.drawer-content {
    width: 100%;
    max-width: 480px;
    border-radius: 24px 24px 0 0;
    padding: 30px 24px 24px 24px;
    border-bottom: none;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 24px;
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.instructions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.instruction-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ins-icon {
    font-size: 2.2rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instruction-item h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.instruction-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ==========================================================================
   6. GAMEPLAY LOOP STYLES (QUESTION, RESULTS, LEADERBOARD, PODIUM)
   ========================================================================== */

/* Active Question Header & Timers */
.question-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-progress-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.15);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.question-cat-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.timer-container {
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    width: 100%;
}

.timer-bar {
    height: 100%;
    width: 100%;
    background: var(--gradient-secondary);
    border-radius: 9px;
    transition: width 0.1s linear;
}

.timer-text {
    position: absolute;
    right: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.question-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    margin: 16px 0 24px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.question-image-box {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
}

.question-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Option Buttons Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: auto;
}

.btn-opt {
    width: 100%;
    min-height: 62px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 20, 36, 0.55);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    transition: var(--transition-fast);
    text-align: left;
    outline: none;
}

.btn-opt:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

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

.opt-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: #ffffff;
    flex-shrink: 0;
}

/* Option Themes */
.opt-a { border-color: rgba(239, 68, 68, 0.35); }
.opt-a .opt-badge { background: linear-gradient(135deg, #ef4444 0%, #f97316 100%); box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
.opt-a:hover { box-shadow: 0 0 15px rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.6); }

.opt-b { border-color: rgba(59, 130, 246, 0.35); }
.opt-b .opt-badge { background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%); box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
.opt-b:hover { box-shadow: 0 0 15px rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.6); }

.opt-c { border-color: rgba(234, 179, 8, 0.35); }
.opt-c .opt-badge { background: linear-gradient(135deg, #eab308 0%, #f97316 100%); box-shadow: 0 0 10px rgba(234, 179, 8, 0.4); }
.opt-c:hover { box-shadow: 0 0 15px rgba(234, 179, 8, 0.15); border-color: rgba(234, 179, 8, 0.6); }

.opt-d { border-color: rgba(16, 185, 129, 0.35); }
.opt-d .opt-badge { background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%); box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.opt-d:hover { box-shadow: 0 0 15px rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.6); }

/* Locked glass overlay */
.question-overlay-locked {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 8, 13, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 5;
    animation: fade-in 0.2s ease-out;
}

.locked-card {
    text-align: center;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.locked-icon {
    font-size: 3rem;
    animation: heartbeat 1.2s infinite ease-in-out;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

/* Results Reveal Screen */
.results-banner {
    text-align: center;
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: scale-up 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.results-banner.correct {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.results-banner.incorrect {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.results-banner.timeout {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.15) 0%, rgba(234, 179, 8, 0.05) 100%);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: #fbbf24;
}

.results-banner h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.results-points {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
}

.results-streak {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.25);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.correct-reveal-box {
    padding: 16px;
    text-align: center;
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.03);
}

.correct-reveal-box small {
    color: #34d399;
    font-weight: 700;
    letter-spacing: 1px;
}

.reveal-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 4px;
}

/* Distribution Chart */
.chart-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-container h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.chart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    color: #ffffff;
}

.chart-bar-outer {
    flex-grow: 1;
    height: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.chart-bar-inner {
    height: 100%;
    width: 0%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-row.correct .chart-bar-outer {
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.chart-count {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    width: 20px;
    text-align: right;
}

.ratio-stats {
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}

.results-footer, .leaderboard-footer {
    margin-top: auto;
    padding: 16px 0;
}

/* Leaderboard list rankings */
.leaderboard-container {
    flex-grow: 1;
    margin-bottom: 24px;
}

.leaderboard-list {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.01);
}

.leader-row.rank-1 {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
}

.leader-row.rank-1 .leader-rank { color: #fbbf24; font-size: 1.2rem; }
.leader-row.rank-2 .leader-rank { color: #9ca3af; font-size: 1.1rem; }
.leader-row.rank-3 .leader-rank { color: #b45309; font-size: 1rem; }

.leader-rank {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    width: 24px;
}

.leader-meta-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.leader-avatar {
    font-size: 1.4rem;
}

.leader-nick {
    font-weight: 600;
}

.leader-streak {
    font-size: 0.75rem;
    color: #fb923c;
    margin-left: 6px;
}

.leader-score {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
}

/* Final Podium */
.podium-area {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 220px;
    margin-bottom: 24px;
    gap: 8px;
    padding: 0 10px;
}

.podium-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    position: relative;
}

.pod-avatar {
    font-size: 2.2rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.pod-nick {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    margin-bottom: 6px;
}

.pod-bar {
    width: 100%;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.pod-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.45rem;
    color: rgba(255,255,255,0.85);
}

.col-1st {
    z-index: 2;
}

.col-1st .pod-bar {
    height: 120px;
    background: linear-gradient(180deg, #eab308 0%, #ca8a04 100%);
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.col-1st .pod-avatar {
    font-size: 2.8rem;
}

.crown-icon {
    font-size: 1.8rem;
    position: absolute;
    top: -24px;
    animation: float 2s infinite ease-in-out;
}

.col-2nd .pod-bar {
    height: 85px;
    background: linear-gradient(180deg, #9ca3af 0%, #4b5563 100%);
    border: 1px solid rgba(156, 163, 175, 0.4);
}

.col-3rd .pod-bar {
    height: 60px;
    background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
    border: 1px solid rgba(180, 83, 9, 0.4);
}

/* Stat sheet card */
.finished-stats {
    padding: 20px;
    margin-bottom: 24px;
}

.finished-stats h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-card small {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.stat-card span {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}
