:root {
    --font-primary: "Times New Roman", Times, serif;
    
    /* VNeID Public Security Light Theme Palette */
    --bg-dark: #f0f2f5;
    --bg-darker: #ffffff;
    --text-light: #0d1e3d;        /* Dark text in bright theme */
    --text-muted: #5e6c84;        /* Gray text */
    
    --glass-bg: rgba(255, 255, 255, 0.9); /* Solid clean cards */
    --glass-border: rgba(14, 74, 158, 0.12); /* Police Blue border */
    --glass-hover: rgba(14, 74, 158, 0.05);
    
    /* VNeID Accent Colors */
    --color-red-start: #d32f2f;   /* Crimson Red (Flag / Logo) */
    --color-red-end: #f44336;
    --color-blue-start: #0a3d82;  /* Police Blue */
    --color-blue-end: #1976d2;
    --color-yellow-start: #e0a300; /* Star/Emblem Gold */
    --color-yellow-end: #fbc02d;
    --color-green-start: #1b5e20; /* Police green accent */
    --color-green-end: #4caf50;
    
    --shadow-glow: 0 8px 30px rgba(10, 61, 130, 0.06); /* Soft elegant shadow */
    --shadow-red: 0 0 15px rgba(211, 47, 47, 0.2);
    --shadow-blue: 0 0 15px rgba(10, 61, 130, 0.2);
    --shadow-yellow: 0 0 15px rgba(224, 163, 0, 0.2);
    --shadow-green: 0 0 15px rgba(27, 94, 32, 0.2);
}

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

body {
    font-family: var(--font-primary);
    background-color: #f4f6fa;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(10, 61, 130, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(224, 163, 0, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header & Logo styling */
header {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bca-logo {
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(10, 61, 130, 0.15));
    transition: transform 0.3s ease;
}

.bca-logo:hover {
    transform: scale(1.05);
}

/* Bright VNeID Card base */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-glow);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Selection Page UI (index.html) */
.gateway-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
}

.gateway-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, var(--color-blue-start) 30%, var(--color-red-start));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.gateway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 800px;
}

.gateway-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-light);
}

.gateway-card:hover {
    background: var(--glass-hover);
    border-color: rgba(14, 74, 158, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(10, 61, 130, 0.08);
}

.gateway-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 10px rgba(10, 61, 130, 0.15));
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    color: var(--color-blue-start);
}

.gateway-icon .lucide {
    width: 54px;
    height: 54px;
    max-width: 100%;
    max-height: 100%;
}

.gateway-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gateway-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Mobile Client Layout (mobile.html) */
.mobile-wrapper {
    flex: 1;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(14, 74, 158, 0.18);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-light);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-blue-start);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(10, 61, 130, 0.12);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--color-blue-start), var(--color-blue-end));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 61, 130, 0.3);
}

/* Waiting Lobby Screen */
.lobby-screen {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--color-blue-start);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    filter: drop-shadow(0 0 10px rgba(19, 104, 206, 0.5));
}

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

/* Mobile Play UI: 4 answer buttons grid */
.mobile-play-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    height: calc(100vh - 180px);
    width: 100%;
}

.mobile-answer-btn {
    border: none;
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 1rem;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
}

.mobile-answer-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0) 60%
    );
    transform: rotate(45deg);
    animation: shineSweep 3.5s ease-in-out infinite;
    pointer-events: none;
}

.mobile-answer-btn:active {
    transform: scale(0.9) translateY(4px);
    filter: brightness(1.2);
}

.btn-red {
    background: linear-gradient(135deg, #ff0844 0%, #ff4e50 50%, #ff7676 100%);
    animation: gradientMove 3s ease infinite, glowPulseRed 2s infinite ease-in-out;
}

.btn-blue {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 50%, #7000ff 100%);
    animation: gradientMove 3s ease infinite, glowPulseBlue 2s infinite ease-in-out;
}

.btn-yellow {
    background: linear-gradient(135deg, #f5af19 0%, #ffdd00 50%, #fff078 100%);
    animation: gradientMove 3s ease infinite, glowPulseYellow 2s infinite ease-in-out;
}

.btn-green {
    background: linear-gradient(135deg, #00ff87 0%, #26890c 50%, #60efff 100%);
    animation: gradientMove 3s ease infinite, glowPulseGreen 2s infinite ease-in-out;
}

/* Animations for flowing fire and sparkling neon glows */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shineSweep {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    25% { transform: translate(100%, 100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

@keyframes glowPulseRed {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(255, 8, 68, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 82, 82, 0.4);
    }
    50% { 
        box-shadow: 0 0 35px rgba(255, 8, 68, 0.95), inset 0 0 20px rgba(255, 255, 255, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }
}

@keyframes glowPulseBlue {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(0, 198, 255, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(0, 198, 255, 0.4);
    }
    50% { 
        box-shadow: 0 0 35px rgba(0, 198, 255, 0.95), inset 0 0 20px rgba(255, 255, 255, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }
}

@keyframes glowPulseYellow {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(245, 175, 25, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(245, 175, 25, 0.4);
    }
    50% { 
        box-shadow: 0 0 35px rgba(245, 175, 25, 0.95), inset 0 0 20px rgba(255, 255, 255, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }
}

@keyframes glowPulseGreen {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(0, 255, 135, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(0, 255, 135, 0.4);
    }
    50% { 
        box-shadow: 0 0 35px rgba(0, 255, 135, 0.95), inset 0 0 20px rgba(255, 255, 255, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }
}

/* Shapes representing choices (same as Kahoot) */
.shape-icon {
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    line-height: 1;
    max-width: 100%;
    max-height: 100%;
    flex: 0 0 auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
    user-select: none;
}

/* Mobile status screens: Answer selected, Feedback correct/incorrect */
.status-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.status-fullscreen.correct {
    background-color: #26890c;
    background-image: linear-gradient(135deg, #26890c, #4cd113);
}

.status-fullscreen.incorrect {
    background-color: #e21b3c;
    background-image: linear-gradient(135deg, #e21b3c, #ff4d6d);
}

.status-fullscreen.waiting-results {
    background-color: var(--bg-dark);
}

.feedback-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.feedback-points {
    font-size: 2.2rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.feedback-score {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Dashboard PC Styles (dashboard.html) */
.dashboard-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
    font-size: 1.15rem;
}

/* Admin Auth Panel */
.auth-panel {
    max-width: 450px;
    margin: auto;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Dashboard Lobby Header (PIN & QR Code) */
.lobby-header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1.2fr;
    gap: 2.5rem;
    align-items: center;
}

.pin-display-card {
    text-align: center;
    padding: 1.5rem;
}

.pin-label {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pin-value {
    font-size: 4.8rem;
    font-weight: 800;
    color: #ffc93c;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(255, 201, 60, 0.4);
}

.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(255,255,255,0.05);
}

.qr-image {
    width: 180px;
    height: 180px;
}

.qr-link-text {
    font-size: 0.9rem;
    color: var(--bg-darker);
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Player Join Grid */
.player-list-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.player-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Control Board Buttons */
.controls-card {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Dashboard Question Screen */
.dashboard-question-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.question-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
    padding: 3rem;
}

.question-text {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}

.timer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timer-circle {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 10px solid rgba(255, 255, 255, 0.05);
    border-top-color: #ffc93c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    transition: border-color 0.3s;
    filter: drop-shadow(0 0 15px rgba(255, 201, 60, 0.2));
}

.timer-circle.critical {
    border-top-color: #e21b3c;
    animation: pulse 1s infinite alternate;
    filter: drop-shadow(0 0 15px rgba(226, 27, 60, 0.5));
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Question Option Blocks Grid for PC */
.dashboard-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.dashboard-option-block {
    display: flex;
    align-items: center;
    padding: 2.2rem;
    border-radius: 18px;
    font-size: 1.7rem;
    font-weight: 700;
    color: white;
    gap: 1.8rem;
    box-shadow: var(--shadow-glow);
    min-width: 0;
    overflow: hidden;
}

.dashboard-option-block .opt-text {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(1rem, 2.2vw, 1.7rem);
}

.dashboard-option-block .shape-icon {
    font-size: 3rem;
}

.dashboard-option-block.correct-indicator {
    border: 5px solid #4cd113;
    position: relative;
    box-shadow: 0 0 30px rgba(76, 209, 19, 0.6);
}

.dashboard-option-block.dimmed {
    opacity: 0.15;
    filter: grayscale(0.8);
}

/* Answer statistics (Horizontal Split Grid Chart) */
.stats-split-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1rem 0;
}

.horizontal-chart-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.chart-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.chart-label-horizontal {
    font-size: 2.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-weight: 800;
}

.bar-track {
    flex: 1;
    height: 48px;
    background: rgba(0, 0, 0, 0.25);
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.chart-bar-horizontal {
    height: 100%;
    border-radius: 24px;
    position: relative;
    transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 48px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.bar-value-horizontal {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 900;
    font-size: 1.6rem;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

/* Fastest Player Spotlight styling (Boxed & Animated) */
.fastest-player-spotlight {
    background: rgba(255, 255, 255, 0.02);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Golden card overlay shine sweep effect */
.fastest-player-spotlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shineSweep 4s infinite ease-in-out;
    pointer-events: none;
}

@keyframes shineSweep {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

.fastest-player-spotlight.has-winner {
    background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
    border: 3px solid #ffd700;
    box-shadow: 0 0 45px rgba(255, 215, 0, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.4);
    transform: scale(1.03);
}

.fastest-player-spotlight.has-winner .spotlight-title {
    color: #5d4037;
    text-shadow: none;
    font-weight: 900;
}

.fastest-player-spotlight.has-winner .spotlight-name {
    color: #1b1b2f;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.fastest-player-spotlight.has-winner .spotlight-time {
    color: #ffffff;
    background: #1b1b2f;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.spotlight-icon-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 198, 0, 0.15);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(255, 198, 0, 0.3);
    }
    50% {
        transform: scale(1.22);
        opacity: 0.8;
        box-shadow: 0 0 25px 12px rgba(255, 198, 0, 0.2);
    }
    100% {
        transform: scale(0.9);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(255, 198, 0, 0.3);
    }
}

.trophy-cup {
    width: 74px;
    height: 74px;
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 10px;
    color: #ffd83d;
    background: radial-gradient(circle, rgba(255, 251, 220, 0.3) 0%, rgba(255, 193, 7, 0.13) 48%, transparent 72%);
    border: 1px solid rgba(255, 236, 153, 0.5);
    border-radius: 50%;
    animation: floatIcon 3s infinite ease-in-out, trophyGlow 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 17px rgba(255, 215, 0, 0.95));
}

.trophy-cup .lucide,
.confirm-modal-icon .lucide {
    width: 100%;
    height: 100%;
}

.trophy-cup .lucide {
    color: #ffdc45;
    stroke: currentColor;
    stroke-width: 2.9;
    filter: drop-shadow(0 1px 0 #fff7c2) drop-shadow(0 0 8px rgba(255, 221, 69, 0.95));
}

.fastest-player-spotlight.has-winner .trophy-cup {
    color: #ffe263;
    border-color: rgba(255, 247, 194, 0.82);
    background: radial-gradient(circle, rgba(255, 255, 245, 0.42) 0%, rgba(255, 204, 37, 0.2) 52%, transparent 75%);
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.08);
    }
}

@keyframes trophyGlow {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.85));
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.85);
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 1));
        text-shadow: 0 0 25px rgba(255, 215, 0, 1);
    }
}

.spotlight-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: rgba(255, 198, 0, 0.95);
    letter-spacing: 2.5px;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.spotlight-name {
    font-size: 2.3rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spotlight-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Leaderboard Page UI */
.leaderboard-title {
    font-size: 2.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ffc93c;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.2rem;
}

.leaderboard-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.leaderboard-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.leaderboard-row {
    transition: background 0.2s;
}

.leaderboard-row:hover {
    background: rgba(255,255,255,0.02);
}

.leaderboard-row:nth-child(1) .rank-num {
    color: #ffd700; /* Gold */
    font-size: 1.5rem;
}

.leaderboard-row:nth-child(2) .rank-num {
    color: #c0c0c0; /* Silver */
    font-size: 1.4rem;
}

.leaderboard-row:nth-child(3) .rank-num {
    color: #cd7f32; /* Bronze */
    font-size: 1.3rem;
}

.rank-num {
    font-weight: 800;
    color: var(--text-muted);
}

.player-name {
    font-weight: 600;
}

.player-score-col {
    font-weight: 800;
    color: #3f8eff;
}

.player-speed-col {
    font-weight: 600;
    color: #4cd113;
}

/* Utility Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

.hidden {
    display: none !important;
}

/* CRUD Modal overlays and layouts */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 2.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close:hover {
    color: white;
}

/* CRUD Database table */
.crud-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.crud-table th, .crud-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.crud-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.crud-table td {
    font-size: 1.05rem;
}

.crud-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
}

.crud-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: rgba(19, 104, 206, 0.15);
    border: 1px solid rgba(19, 104, 206, 0.4);
    color: #3f8eff;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: rgba(19, 104, 206, 0.3);
    color: white;
}

.btn-delete {
    background: rgba(226, 27, 60, 0.15);
    border: 1px solid rgba(226, 27, 60, 0.4);
    color: #ff4d6d;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: rgba(226, 27, 60, 0.3);
    color: white;
}

.btn-add {
    background: linear-gradient(135deg, #6e42ca, #8d4df7);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(110, 66, 202, 0.3);
}

.btn-add:hover {
    box-shadow: 0 6px 20px rgba(110, 66, 202, 0.5);
    transform: translateY(-2px);
}

/* CRUD Form inputs Left-Accents mapping option colors */
.input-accent-red {
    border-left: 5px solid var(--color-red-start) !important;
}
.input-accent-blue {
    border-left: 5px solid var(--color-blue-start) !important;
}
.input-accent-yellow {
    border-left: 5px solid var(--color-yellow-start) !important;
}
.input-accent-green {
    border-left: 5px solid var(--color-green-start) !important;
}

/* Custom premium popup toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(10, 11, 16, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), fadeOut 0.3s ease 2.7s forwards;
    width: 320px;
}

.toast.success {
    border-left: 5px solid var(--color-green-start);
}

.toast.error {
    border-left: 5px solid var(--color-red-start);
}

.toast.warning {
    border-left: 5px solid var(--color-yellow-start);
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* Custom premium confirmation modal */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    animation: fadeIn 0.25s ease;
}

.confirm-modal-content {
    background: rgba(20, 22, 33, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-glow);
    text-align: center;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confirm-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffc93c;
    margin-bottom: 0.8rem;
}

.confirm-message {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1.8rem;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Interactive dynamic canvas background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: auto;
}

/* Premium Dynamic Takeover Leaderboard styles */
.leaderboard-container {
    width: 100%;
    margin-top: 1rem;
    background: transparent;
}

.leaderboard-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    font-weight: 800;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--glass-border);
    font-size: 1.15rem;
}

.leaderboard-list-wrapper {
    position: relative;
    width: 100%;
    margin-top: 10px;
    height: 400px;
}

.leaderboard-row-item {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 2.5s cubic-bezier(0.34, 1.3, 0.64, 1), background 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.leaderboard-row-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.leaderboard-row-item .rank-badge {
    width: 15%;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaderboard-row-item.rank-1 .rank-badge {
    color: #ffc93c;
    text-shadow: 0 0 10px rgba(255, 201, 60, 0.5);
}

.leaderboard-row-item.rank-2 .rank-badge {
    color: #e2e2e2;
    text-shadow: 0 0 10px rgba(226, 226, 226, 0.5);
}

.leaderboard-row-item.rank-3 .rank-badge {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.leaderboard-row-item .player-name {
    width: 40%;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-light);
    text-align: left;
}

.leaderboard-row-item .player-time-col {
    width: 25%;
    display: flex;
    justify-content: center;
}

.leaderboard-row-item .player-score-col {
    width: 20%;
    display: flex;
    justify-content: center;
}

/* Glow Capsules */
.capsule-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.capsule-badge.time-glow {
    background: rgba(76, 209, 19, 0.12);
    border: 1.5px solid var(--color-green-start);
    color: var(--color-green-end);
    text-shadow: 0 0 8px rgba(76, 209, 19, 0.4);
}

.capsule-badge.time-glow.incorrect {
    background: rgba(226, 27, 60, 0.12);
    border: 1.5px solid var(--color-red-start);
    color: var(--color-red-end);
    text-shadow: 0 0 8px rgba(226, 27, 60, 0.4);
}

.capsule-badge.score-glow {
    background: rgba(63, 142, 255, 0.12);
    border: 1.5px solid var(--color-blue-start);
    color: var(--color-blue-end);
    text-shadow: 0 0 8px rgba(63, 142, 255, 0.4);
}

/* Two-column CMS Layout styles */
.manage-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

@media (max-width: 900px) {
    .manage-grid {
        grid-template-columns: 1fr;
    }
}

.set-list-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 450px;
}

.set-items-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.set-item {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    font-weight: 600;
}

.set-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.set-item.active {
    background: linear-gradient(135deg, rgba(63, 142, 255, 0.15), rgba(63, 142, 255, 0.03));
    border-color: var(--color-blue-start);
    color: #ffc93c;
    box-shadow: 0 4px 15px rgba(19, 104, 206, 0.15);
}

.set-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
    font-size: 1.05rem;
}

.set-delete-btn {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s, transform 0.2s;
}

.set-delete-btn:hover {
    color: var(--color-red-end);
    transform: scale(1.2);
}

.btn-home {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    background: rgba(10, 61, 130, 0.07);
    border: 1px solid var(--glass-border);
    color: var(--color-blue-start);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-home .lucide {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.btn-home:hover {
    background: rgba(10, 61, 130, 0.15) !important;
    border-color: rgba(10, 61, 130, 0.25) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 61, 130, 0.08);
}

/* Floating Close Game Button (Top Left) */
.btn-close-game-global {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 800;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 1px;
}

.btn-close-game-global:hover {
    transform: translateY(-2px) scale(1.05);
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6), 0 0 15px rgba(211, 47, 47, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-close-game-global:active {
    transform: translateY(1px) scale(0.98);
}

/* Custom Confirm Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.confirm-modal-card {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    border: 2px solid rgba(211, 47, 47, 0.4);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(211, 47, 47, 0.25);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    width: 90%;
    max-width: 450px;
    text-align: center;
    animation: modalPopIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    animation: bounceWarning 2s infinite ease-in-out;
}

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

.confirm-modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ff4d6d;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.confirm-modal-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.confirm-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.7rem 2rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    letter-spacing: 1px;
}

.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-modal-confirm {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.7rem 2rem;
    font-weight: 800;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
    transition: all 0.2s ease;
    min-width: 120px;
    letter-spacing: 1px;
}

.btn-modal-confirm:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.5);
    transform: translateY(-2px);
}

.btn-modal-confirm:active {
    transform: translateY(1px);
}

/* Podium Layout Styling */
.gameover-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 0 2px 5px rgba(0,0,0,0.5);
    margin-bottom: 2.5rem;
    letter-spacing: 2px;
}

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    height: 380px;
    width: 100%;
    max-width: 680px;
    margin: 1rem auto 3rem auto;
    padding-bottom: 1rem;
}

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

/* Base Blocks heights */
.podium-second .podium-block {
    height: 120px;
    background: linear-gradient(180deg, rgba(200, 200, 200, 0.15) 0%, rgba(200, 200, 200, 0.05) 100%);
    border: 2px solid rgba(200, 200, 200, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.podium-first .podium-block {
    height: 180px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 198, 0, 0.08) 100%);
    border: 2px solid #ffd700;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.podium-third .podium-block {
    height: 80px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.15) 0%, rgba(205, 127, 50, 0.05) 100%);
    border: 2px solid rgba(205, 127, 50, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.podium-block {
    width: 100%;
    border-radius: 12px 12px 0 0;
    position: relative;
    overflow: hidden;
}

/* Avatar details */
.podium-avatar {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 0.6rem;
    z-index: 2;
    transition: transform 0.3s ease;
}

.podium-first .podium-avatar {
    width: 76px;
    height: 76px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    animation: bounceWinnerAvatar 2.5s infinite ease-in-out;
}

.podium-avatar .lucide {
    width: 80%;
    height: 80%;
    max-width: 100%;
    max-height: 100%;
}

.gold-icon { color: #ffd700; }
.silver-icon { color: #cbd5e1; }
.bronze-icon { color: #cd7f32; }

.lucide {
    display: inline-block;
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
    stroke-width: 2.2;
}

.panel-hero-icon,
.status-hero-icon {
    width: 64px;
    height: 64px;
    display: inline-grid;
    place-items: center;
    margin: 0 auto 0.75rem;
    color: #ffc93c;
}

.panel-hero-icon .lucide,
.status-hero-icon .lucide {
    width: 100%;
    height: 100%;
}

.status-hero-icon.danger { color: var(--color-red-start); }
.section-heading-icon { width: 24px; height: 24px; }
.icon-label { display: inline-flex; align-items: center; gap: 0.5rem; }
.icon-label .lucide { width: 20px; height: 20px; }
.toast-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.rank-icon { width: 20px; height: 20px; }
.rank-badge { display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.gameover-title { display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }
.gameover-title .lucide { width: 34px; height: 34px; color: #ffd700; }
.crown-icon { display: inline-grid; width: 22px; height: 22px; place-items: center; }
.crown-icon .lucide { width: 100%; height: 100%; }

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
}

.tab-btn .lucide { width: 20px; height: 20px; }

@media (max-width: 760px) {
    header { padding: 0.75rem 1rem !important; }
    .bca-logo { max-width: 150px; height: 48px !important; object-fit: contain; }
    .btn-home { padding: 0.55rem 0.8rem; }
    .gateway-icon { width: 58px; height: 58px; }
    .lobby-no-room-grid { grid-template-columns: 1fr !important; }
    .lobby-no-room-grid > div:first-child {
        border-right: 0 !important;
        border-bottom: 1px solid var(--glass-border);
        padding-right: 0 !important;
        padding-bottom: 1.5rem;
    }
    .tab-btn { padding: 0.65rem 0.7rem; font-size: 0.9rem; }
    .gameover-title .lucide { width: 26px; height: 26px; }
    .dashboard-options-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .dashboard-option-block { padding: 1rem; gap: 0.8rem; }
    .mobile-play-grid { gap: 0.75rem; height: calc(100dvh - 170px); }
    .mobile-answer-btn { border-radius: 18px; min-height: 110px; }
    .quick-row-4, .quick-row-3, .quick-row-2 { grid-template-columns: 1fr !important; }
    #pick-set-filter { width: 42% !important; min-width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

@keyframes bounceWinnerAvatar {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

/* Celebration system: short-lived, pointer-safe effects for round results and winners */
.celebration-layer {
    position: fixed;
    inset: 0;
    z-index: 5000;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.celebration-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.68), rgba(255, 214, 10, 0.18) 25%, transparent 62%);
    opacity: 0;
    animation: celebrationFlash 0.7s ease-out both;
}

.celebration-round .celebration-flash,
.celebration-success .celebration-flash {
    background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.58), rgba(76, 209, 19, 0.16) 28%, transparent 62%);
}

.confetti-piece {
    position: absolute;
    top: -8vh;
    left: var(--start-x);
    width: 11px;
    height: 20px;
    border-radius: 3px;
    background: var(--color);
    box-shadow: 0 0 9px color-mix(in srgb, var(--color) 70%, transparent);
    opacity: 0;
    animation: confettiFall var(--duration) cubic-bezier(0.16, 0.72, 0.28, 1) var(--delay) forwards;
}

.confetti-piece.shape-1 {
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.confetti-piece.shape-2 {
    width: 17px;
    height: 9px;
    border-radius: 999px;
}

.celebration-ring {
    position: absolute;
    left: 50%;
    top: 43%;
    width: 80px;
    height: 80px;
    border: 5px solid var(--ring-color);
    border-radius: 50%;
    opacity: 0;
    filter: drop-shadow(0 0 12px var(--ring-color));
    transform: translate(-50%, -50%) scale(0.15);
    animation: celebrationRing 1.15s ease-out var(--ring-delay) both;
}

.celebration-burst {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    animation: burstAppear 0.95s ease-out var(--burst-delay) both;
}

.burst-ray {
    position: absolute;
    left: -3px;
    top: -6px;
    width: 6px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(to top, transparent, var(--color));
    box-shadow: 0 0 10px var(--color);
    transform-origin: 50% 100%;
    transform: rotate(var(--ray-angle)) translateY(-18px) scaleY(0.2);
    animation: burstRay 0.9s cubic-bezier(0.12, 0.72, 0.24, 1) var(--burst-delay) both;
}

.status-fullscreen.correct,
.status-fullscreen.incorrect {
    overflow: hidden;
    isolation: isolate;
}

.status-fullscreen.correct::before,
.status-fullscreen.incorrect::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(135vw, 850px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255,255,255,0.22) 0deg 8deg, transparent 8deg 22deg);
    mask-image: radial-gradient(circle, transparent 0 9%, #000 11% 46%, transparent 74%);
    animation: resultSunburst 16s linear infinite;
}

.correct-impact .feedback-title {
    animation: titleVictoryPop 0.8s cubic-bezier(0.16, 1.35, 0.35, 1) both;
}

.correct-impact .feedback-points {
    animation: scoreCountPop 0.72s cubic-bezier(0.18, 1.5, 0.3, 1) 0.18s both;
}

.incorrect-impact .feedback-title {
    animation: gentleShake 0.55s ease-out both;
}

.result-reveal .stats-correct-wrapper,
.result-reveal #gameover-rank {
    animation: answerGlowReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-reveal .chart-row {
    animation: resultRowSlide 0.55s ease-out both;
}

.result-reveal .chart-row:nth-child(2) { animation-delay: 0.08s; }
.result-reveal .chart-row:nth-child(3) { animation-delay: 0.16s; }
.result-reveal .chart-row:nth-child(4) { animation-delay: 0.24s; }

.result-reveal .fastest-player-spotlight.has-winner {
    animation: spotlightReveal 0.9s cubic-bezier(0.16, 1.15, 0.3, 1) 0.22s both;
}

.winner-reveal .gameover-title,
.mobile-winner-reveal #gameover-title {
    color: transparent;
    background: linear-gradient(100deg, #ffb703 0%, #fff4b5 38%, #ffd60a 52%, #ff7b00 72%, #ffd60a 100%);
    background-size: 220% auto;
    background-clip: text;
    -webkit-background-clip: text;
    animation: winnerTitleReveal 0.85s cubic-bezier(0.16, 1.25, 0.3, 1) both,
               winnerTitleShine 2.8s linear 0.85s infinite;
}

.winner-reveal .gameover-title .lucide {
    animation: trophyWiggle 1.15s cubic-bezier(0.16, 1.3, 0.3, 1) both;
}

.winner-reveal .podium-column {
    opacity: 0;
    animation: podiumRise 0.85s cubic-bezier(0.16, 1.1, 0.3, 1) both;
}

.winner-reveal .podium-second { animation-delay: 0.25s; }
.winner-reveal .podium-third { animation-delay: 0.4s; }
.winner-reveal .podium-first { animation-delay: 0.58s; }

.winner-reveal .podium-first .podium-block {
    animation: championBlockGlow 1.6s ease-in-out 1.15s infinite alternate;
}

.winner-reveal .remaining-leaderboard,
.winner-reveal .leaderboard-table {
    animation: resultRowSlide 0.75s ease-out 1s both;
}

.mobile-winner-reveal .status-hero-icon {
    animation: winnerIconLand 0.9s cubic-bezier(0.16, 1.4, 0.3, 1) both,
               championIconGlow 1.5s ease-in-out 0.9s infinite alternate;
}

.mobile-winner-reveal #gameover-rank {
    animation: scoreCountPop 0.8s cubic-bezier(0.16, 1.35, 0.3, 1) 0.22s both;
}

@keyframes celebrationFlash {
    0% { opacity: 0; }
    22% { opacity: 0.9; }
    100% { opacity: 0; }
}

@keyframes confettiFall {
    0% { opacity: 0; transform: translate3d(0, -8vh, 0) rotate(0); }
    8% { opacity: 1; }
    82% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(var(--drift), 116vh, 0) rotate(var(--spin)); }
}

@keyframes celebrationRing {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.15); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}

@keyframes burstAppear {
    0%, 100% { opacity: 0; }
    10%, 62% { opacity: 1; }
}

@keyframes burstRay {
    0% { opacity: 0; transform: rotate(var(--ray-angle)) translateY(-12px) scaleY(0.15); }
    22% { opacity: 1; }
    100% { opacity: 0; transform: rotate(var(--ray-angle)) translateY(-112px) scaleY(1.35); }
}

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

@keyframes titleVictoryPop {
    0% { opacity: 0; transform: translateY(28px) scale(0.55) rotate(-4deg); }
    65% { opacity: 1; transform: translateY(-8px) scale(1.13) rotate(2deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes scoreCountPop {
    0% { opacity: 0; transform: scale(0.45); }
    70% { opacity: 1; transform: scale(1.16); box-shadow: 0 0 38px rgba(255,255,255,0.42); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes gentleShake {
    0%, 100% { transform: translateX(0); }
    22% { transform: translateX(-12px) rotate(-1deg); }
    45% { transform: translateX(10px) rotate(1deg); }
    68% { transform: translateX(-5px); }
}

@keyframes answerGlowReveal {
    0% { opacity: 0; transform: translateY(24px) scale(0.92); box-shadow: 0 0 0 rgba(76,209,19,0); }
    62% { opacity: 1; transform: translateY(-4px) scale(1.025); box-shadow: 0 0 42px rgba(76,209,19,0.38); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes resultRowSlide {
    from { opacity: 0; transform: translateX(-28px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spotlightReveal {
    0% { opacity: 0; transform: scale(0.72) rotate(-3deg); }
    68% { opacity: 1; transform: scale(1.05) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes winnerTitleReveal {
    0% { opacity: 0; transform: translateY(-32px) scale(0.72); letter-spacing: -3px; }
    68% { opacity: 1; transform: translateY(6px) scale(1.08); }
    100% { opacity: 1; transform: translateY(0) scale(1); letter-spacing: 2px; }
}

@keyframes winnerTitleShine {
    to { background-position: -220% center; }
}

@keyframes trophyWiggle {
    0% { opacity: 0; transform: scale(0.3) rotate(-35deg); }
    65% { opacity: 1; transform: scale(1.24) rotate(10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes podiumRise {
    0% { opacity: 0; transform: translateY(170px) scale(0.82); }
    72% { opacity: 1; transform: translateY(-12px) scale(1.035); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes championBlockGlow {
    from { box-shadow: 0 15px 40px rgba(255,215,0,0.24), inset 0 1px 0 rgba(255,255,255,0.2); }
    to { box-shadow: 0 15px 58px rgba(255,215,0,0.58), 0 0 22px rgba(255,255,255,0.16), inset 0 1px 0 rgba(255,255,255,0.35); }
}

@keyframes winnerIconLand {
    0% { opacity: 0; transform: translateY(-55px) scale(0.35) rotate(-24deg); }
    68% { opacity: 1; transform: translateY(7px) scale(1.2) rotate(8deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes championIconGlow {
    from { filter: drop-shadow(0 0 6px rgba(255,215,0,0.42)); }
    to { filter: drop-shadow(0 0 22px rgba(255,215,0,0.95)); }
}

@media (max-width: 760px) {
    .confetti-piece { width: 8px; height: 15px; }
    .celebration-ring { width: 54px; height: 54px; border-width: 3px; }
    .burst-ray { height: 22px; }
    .feedback-title { font-size: clamp(2.7rem, 16vw, 4.8rem); }
    .feedback-points { font-size: clamp(2rem, 10vw, 3.2rem); }
    .mobile-winner-reveal { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .celebration-layer.reduced .celebration-flash { animation-duration: 0.35s !important; }
    .celebration-layer.reduced .confetti-piece,
    .celebration-layer.reduced .celebration-ring,
    .celebration-layer.reduced .celebration-burst { display: none; }
}

/* Source-free animated stage backgrounds */
.fastest-player-spotlight {
    isolation: isolate;
}

.fastest-player-spotlight > :not(.fastest-scene) {
    position: relative;
    z-index: 2;
}

.fastest-player-spotlight.has-winner {
    background:
        radial-gradient(circle at 50% 26%, rgba(255, 230, 120, 0.26), transparent 29%),
        linear-gradient(145deg, #261f0a 0%, #131827 48%, #211504 100%);
    border-color: rgba(255, 220, 75, 0.88);
    box-shadow: 0 0 52px rgba(255, 193, 7, 0.38), inset 0 0 45px rgba(255, 215, 0, 0.08);
}

.fastest-player-spotlight.has-winner .spotlight-title {
    color: #ffeaa0;
    text-shadow: 0 0 16px rgba(255, 211, 56, 0.48);
}

.fastest-player-spotlight.has-winner .spotlight-name {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.46), 0 0 28px rgba(255, 193, 7, 0.34);
}

.fastest-player-spotlight.has-winner .spotlight-time {
    color: #17120a;
    background: linear-gradient(135deg, #fff7c2, #ffc400);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 20px rgba(255, 196, 0, 0.4), 0 5px 14px rgba(0, 0, 0, 0.3);
}

.fastest-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.2;
    transition: opacity 0.45s ease;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 28px 28px;
}

.has-winner .fastest-scene { opacity: 1; }

.speed-orbit {
    position: absolute;
    left: 50%;
    top: 39%;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(255, 222, 89, 0.36);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px rgba(255, 201, 60, 0.12), inset 0 0 24px rgba(255, 201, 60, 0.08);
}

.speed-orbit::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    left: 12%;
    top: 12%;
    border-radius: 50%;
    background: #fff3a6;
    box-shadow: 0 0 16px 5px rgba(255, 211, 61, 0.68);
}

.orbit-one { animation: speedOrbitSpin 6s linear infinite; }
.orbit-two {
    width: 245px;
    height: 245px;
    border-style: dashed;
    opacity: 0.55;
    animation: speedOrbitSpinReverse 9s linear infinite;
}

.speed-streak {
    position: absolute;
    left: -45%;
    width: 42%;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, #fff5bd 72%, #ffffff);
    filter: drop-shadow(0 0 5px rgba(255, 220, 90, 0.8));
    animation: speedStreak 2.4s ease-in-out infinite;
}

.streak-one { top: 24%; }
.streak-two { top: 57%; animation-delay: 0.72s; width: 58%; }
.streak-three { top: 79%; animation-delay: 1.34s; width: 34%; }

.speed-star,
.victory-star {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px 3px rgba(255, 235, 151, 0.7);
    animation: stageStarTwinkle 2.1s ease-in-out infinite alternate;
}

.speed-star::before,
.victory-star::before {
    content: "";
    position: absolute;
    inset: -5px 2px;
    border-left: 1px solid rgba(255,255,255,0.74);
}

.speed-star.star-one { left: 12%; top: 18%; }
.speed-star.star-two { right: 13%; top: 28%; animation-delay: 0.5s; }
.speed-star.star-three { left: 18%; bottom: 18%; animation-delay: 1.1s; }
.speed-star.star-four { right: 21%; bottom: 15%; animation-delay: 1.55s; }

.fastest-record-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 28px;
    padding: 0.35rem 0.8rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 229, 119, 0.62);
    border-radius: 999px;
    color: #fff1a6;
    background: rgba(255, 193, 7, 0.12);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 1.15px;
    opacity: 0;
    transform: translateY(-8px) scale(0.9);
}

.fastest-record-badge .lucide { width: 15px; height: 15px; }

.has-winner .fastest-record-badge {
    animation: recordBadgeDrop 0.65s cubic-bezier(0.16, 1.3, 0.3, 1) 0.3s both;
}

#view-gameover {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 760px;
    background:
        linear-gradient(180deg, rgba(5, 10, 29, 0.88), rgba(19, 15, 37, 0.94)),
        radial-gradient(circle at 50% 20%, rgba(78, 98, 255, 0.18), transparent 50%);
    border-color: rgba(255, 213, 79, 0.24);
}

#view-gameover > :not(.victory-stage-bg) {
    position: relative;
    z-index: 2;
}

.victory-stage-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 28%, rgba(255, 211, 67, 0.1), transparent 28%),
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: auto, 45px 45px, 45px 45px;
    mask-image: linear-gradient(to bottom, #000 0 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0 78%, transparent 100%);
}

.victory-aurora {
    position: absolute;
    width: 55%;
    aspect-ratio: 1;
    top: -26%;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.28;
    animation: auroraFloat 8s ease-in-out infinite alternate;
}

.aurora-one { left: -12%; background: #2368ff; }
.aurora-two { right: -12%; background: #d42bff; animation-delay: -3s; }

.victory-beam {
    position: absolute;
    top: -16%;
    width: 24%;
    height: 85%;
    opacity: 0.22;
    filter: blur(5px);
    background: linear-gradient(to bottom, rgba(255, 247, 194, 0.75), rgba(255, 209, 64, 0.08) 72%, transparent);
    clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
    transform-origin: 50% 0;
    animation: stageBeamSweep 5.5s ease-in-out infinite alternate;
}

.beam-left { left: 8%; --beam-angle: 12deg; }
.beam-center { left: 38%; width: 25%; opacity: 0.17; --beam-angle: 0deg; animation-delay: -1.8s; }
.beam-right { right: 8%; --beam-angle: -12deg; animation-delay: -3.1s; }

.victory-star.star-1 { left: 8%; top: 14%; }
.victory-star.star-2 { left: 19%; top: 35%; animation-delay: 0.7s; }
.victory-star.star-3 { left: 31%; top: 12%; animation-delay: 1.3s; }
.victory-star.star-4 { left: 45%; top: 27%; animation-delay: 0.25s; }
.victory-star.star-5 { right: 37%; top: 9%; animation-delay: 1.8s; }
.victory-star.star-6 { right: 23%; top: 31%; animation-delay: 0.95s; }
.victory-star.star-7 { right: 10%; top: 17%; animation-delay: 1.45s; }
.victory-star.star-8 { right: 5%; top: 45%; animation-delay: 0.4s; }

.victory-horizon {
    position: absolute;
    left: 50%;
    top: 49%;
    width: 85%;
    height: 34%;
    border-radius: 50%;
    border-top: 2px solid rgba(255, 220, 84, 0.45);
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 205, 58, 0.14), transparent 66%);
    transform: translateX(-50%);
    box-shadow: 0 -12px 45px rgba(255, 198, 38, 0.12);
}

.podium-container {
    position: relative;
    perspective: 900px;
}

.podium-stage-floor {
    position: absolute !important;
    z-index: 0 !important;
    left: -13%;
    bottom: -7%;
    width: 126%;
    height: 37%;
    border: 1px solid rgba(255, 218, 80, 0.32);
    border-radius: 50%;
    background:
        repeating-radial-gradient(ellipse at center, transparent 0 18px, rgba(255, 211, 67, 0.08) 19px 20px),
        radial-gradient(ellipse at center, rgba(255, 211, 67, 0.2), rgba(54, 40, 100, 0.12) 48%, transparent 72%);
    box-shadow: 0 0 50px rgba(255, 200, 45, 0.16), inset 0 0 32px rgba(255, 225, 121, 0.08);
    transform: rotateX(67deg);
    animation: stageFloorPulse 3.2s ease-in-out infinite alternate;
}

.podium-column { z-index: 2; }

.podium-column::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: 8%;
    width: 120%;
    height: 72%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.12), transparent 68%);
    transform: translateX(-50%);
    filter: blur(16px);
    opacity: 0.5;
}

.podium-first::before {
    width: 150%;
    height: 98%;
    background: radial-gradient(ellipse, rgba(255, 214, 59, 0.31), rgba(255, 184, 0, 0.08) 48%, transparent 72%);
    animation: championAura 2s ease-in-out infinite alternate;
}

@keyframes speedOrbitSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes speedOrbitSpinReverse {
    from { transform: translate(-50%, -50%) rotate(360deg); }
    to { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes speedStreak {
    0%, 15% { opacity: 0; transform: translateX(0) scaleX(0.4); }
    35%, 65% { opacity: 0.78; }
    100% { opacity: 0; transform: translateX(355%) scaleX(1); }
}

@keyframes stageStarTwinkle {
    from { opacity: 0.3; transform: scale(0.65); }
    to { opacity: 1; transform: scale(1.35); }
}

@keyframes recordBadgeDrop {
    0% { opacity: 0; transform: translateY(-12px) scale(0.82); }
    70% { opacity: 1; transform: translateY(3px) scale(1.06); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes auroraFloat {
    from { transform: translate3d(-3%, -2%, 0) scale(0.92); }
    to { transform: translate3d(6%, 5%, 0) scale(1.08); }
}

@keyframes stageBeamSweep {
    from { transform: rotate(calc(var(--beam-angle, 0deg) - 8deg)) scaleX(0.82); opacity: 0.1; }
    to { transform: rotate(calc(var(--beam-angle, 0deg) + 9deg)) scaleX(1.08); opacity: 0.3; }
}

@keyframes stageFloorPulse {
    from { opacity: 0.64; filter: brightness(0.85); }
    to { opacity: 1; filter: brightness(1.25); }
}

@keyframes championAura {
    from { opacity: 0.4; transform: translateX(-50%) scale(0.92); }
    to { opacity: 0.9; transform: translateX(-50%) scale(1.08); }
}

@media (max-width: 760px) {
    #view-gameover { min-height: 680px; }
    .victory-aurora { width: 90%; }
    .victory-beam { width: 38%; }
    .podium-stage-floor { left: -4%; width: 108%; }
    .fastest-record-badge { font-size: 0.65rem; }
}

/* Rank badges */
.podium-rank-badge {
    font-size: 1.1rem;
    font-weight: 900;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.podium-rank-badge.gold {
    background: #ffd700;
    color: #121212;
    font-size: 1.3rem;
    padding: 0.4rem 1rem;
}

.podium-rank-badge.silver {
    background: #c0c0c0;
    color: #121212;
}

.podium-rank-badge.bronze {
    background: #cd7f32;
    color: #ffffff;
}

/* Confetti particles overlay */
.glow-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 215, 0, 0.2) 10%, transparent 10.5%);
    background-size: 15px 15px;
    animation: sparkleMove 4s linear infinite;
}

@keyframes sparkleMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 60px; }
}

/* Crown floating */
.crown-icon {
    font-size: 1.2rem;
    animation: floatCrown 1.5s infinite ease-in-out;
}

@keyframes floatCrown {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-4px) rotate(5deg); }
}

/* Username and Score on Podium */
.podium-username {
    font-size: 1.25rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.4rem;
    text-align: center;
    max-width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-username.highlight {
    font-size: 1.7rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 2px 12px rgba(255, 215, 0, 0.45), 0 0 20px rgba(255, 215, 0, 0.2);
}

.podium-score {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.podium-first .podium-score {
    font-size: 1.15rem;
    color: #ffc93c;
    font-weight: 800;
}

/* Scrollable leaderboard table below */
.remaining-leaderboard-container {
    width: 100%;
    max-width: 600px;
    background: linear-gradient(145deg, rgba(3, 8, 24, 0.94), rgba(17, 20, 43, 0.92));
    border: 1px solid rgba(255, 214, 69, 0.38);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

.remaining-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    color: #ffe47a;
    text-shadow: 0 0 15px rgba(255, 201, 60, 0.38);
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.compact-table {
    margin-bottom: 0;
}

.remaining-leaderboard-container .compact-table thead {
    background: rgba(255, 213, 70, 0.09);
}

.remaining-leaderboard-container .compact-table th {
    color: #f8fbff;
    font-weight: 800;
    letter-spacing: 0.35px;
    border-bottom: 1px solid rgba(255, 220, 104, 0.34);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.remaining-leaderboard-container .compact-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.035);
}

.remaining-leaderboard-container .compact-table tbody tr:hover {
    background: rgba(255, 210, 62, 0.1);
}

.remaining-leaderboard-container .compact-table td {
    color: #f7f9ff;
    border-bottom-color: rgba(255, 255, 255, 0.11);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
}

.remaining-leaderboard-container .compact-table .rank-num {
    color: #dce8ff !important;
    font-size: 1.2rem;
    font-weight: 900;
}

.remaining-leaderboard-container .compact-table .player-name {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.remaining-leaderboard-container .compact-table .player-score-col {
    color: #ffdc51 !important;
    font-weight: 900 !important;
    text-shadow: 0 0 10px rgba(255, 201, 60, 0.34) !important;
}
