        body {
            background: #0a0a23;
            color: #ffd700;
            font-family: 'Roboto Mono', monospace;
            margin: 0;
            overflow: hidden;
            overflow-y: auto;
            position: relative;
            background-image:
                radial-gradient(circle at 30% 20%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 100, 0, 0.15) 0%, transparent 50%);
            animation: star-twinkle 8s infinite alternate;
            min-height: 90vh;           
    padding-bottom: 75px;

        }

        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('https://rockettyping.vercel.app/images/stars-bg.png') repeat;
            opacity: 0.6;
            z-index: -1;
            animation: nebula-move 120s linear infinite;
        }

        @keyframes nebula-move {
            0% {
                background-position: 0 0;
            }

            100% {
                background-position: 2000px 2000px;
            }
        }

        @keyframes star-twinkle {
            0% {
                filter: brightness(1);
            }

            100% {
                filter: brightness(1.3);
            }
        }

        #app {
            background: rgba(10, 10, 35, 0.85);
            box-shadow: 0 0 80px rgba(255, 215, 0, 0.3);
            border: 2px solid #ff9900;
            border-radius: 20px;
            padding: 20px;
            max-width: 1400px;
            margin: 40px auto;
            position: relative;
            z-index: 2;
        }

        section#about {
            max-width: 800px;
            margin: 40px auto 20px;
            padding: 30px 20px;
            color: #ffffff;
            text-align: left;
            background: rgba(43, 45, 48, 0.8);
            border-radius: 8px;
            border: 1px solid #444;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 16px;
            line-height: 1.6;
        }

        section#about h2 {
            color: #e2b714;
            font-size: 24px;
            margin-bottom: 20px;
            font-family: 'Roboto Mono', monospace;
        }

        section#about p {
            margin-bottom: 15px;
            color: #cccccc;
        }

        section#about strong {
            color: #e2b714;
        }

        #aboutModal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        #aboutModal.active {
            display: flex;
        }

        .modal-content {
            background-color: #2b2d30;
            color: #ffffff;
            padding: 40px;
            border-radius: 8px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            border: 1px solid #444;
        }

        .modal-close {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            color: #e2b714;
            font-size: 24px;
            cursor: pointer;
            transition: color 0.2s;
        }

        .modal-close:hover {
            color: #ffffff;
        }

        .modal-content h2 {
            color: #e2b714;
            font-size: 28px;
            margin-top: 0;
            margin-bottom: 20px;
            font-family: 'Roboto Mono', monospace;
        }

        .modal-content p {
            color: #cccccc;
            margin-bottom: 15px;
            font-size: 15px;
            line-height: 1.6;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        .modal-content strong {
            color: #e2b714;
        }

        body {
            padding-bottom: 60px;
        }

footer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2b2d30;
    padding: 15px 20px;
    text-align: center;
    color: #999;
    border-top: 1px solid #444;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    z-index: 999;
    transition: opacity 0.3s ease;
}
        footer a {
            color: #e2b714;
            text-decoration: none;
            margin: 0 8px;
            transition: opacity 0.2s;
        }

        footer a:hover {
            opacity: 0.8;
        }

        #test-config {
            position: absolute;
            top: 45px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            color: #e2b714;
            opacity: 0.6;
            transition: opacity 0.2s;
            z-index: 30;
        }

        #test-config:hover {
            opacity: 1;
        }

        #test-config button {
            background: none;
            border: none;
            color: #e2b714;
            cursor: pointer;
            font-size: 16px;
            padding: 6px 12px;
            border-radius: 4px;
            transition: background 0.15s;
        }

        #test-config button:hover {
            background: rgba(226, 183, 20, 0.1);
        }

        #test-config button.active {
            text-decoration: underline;
        }

        #words {
            font-size: 42px;
            text-align: left;
            max-width: 100%;
            line-height: 1.5;
            padding: 0 20px;
            user-select: none;
            position: relative;
            height: 220px;
            overflow-y: auto;
            scroll-behavior: smooth;
            transition: opacity 0.25s ease;
            margin-top: 250px;
                display: flex;
    flex-wrap: wrap;
            gap:6px;
            scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;
        }

        #words .word {
            display: inline-block;
            margin-right: 20px;
            position: relative;
        }

        #words .word.active {}

        #words .letter {
            color: #646669;
            transition: color 0.1s ease, transform 0.05s ease;
        }

        #words .letter.correct {
            color: #ffffff;
            transform: none;
        }

        #words .letter.incorrect {
            color: #da3333;
        }

        #words .letter.extra {
            color: #7e2a33;
        }

        #words .letter {
            transition: color 0.1s;
        }

        #words .active {
            border-bottom: 2px solid #00e6cc;
        }

        #caret {
            position: absolute;
            width: 3.5px;
            height: 45px;
            background: #00e6cc;
            transition: transform 0.06s linear, height 0.06s linear;
            will-change: transform, height;
            left: 0;
            top: 0;
        }

        #caret.blink {
            animation: blink 1s step-end infinite;
        }

        @keyframes blink {
            50% {
                opacity: 0;
            }
        }

        #input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        #timer {
            position: absolute;
            top: 95px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 48px;
            font-weight: bold;
            letter-spacing: 2px;
            color: #ff4c4c;
            z-index: 30;
        }

        #timer.highlight {
            background-color: #ffffff;
            color: #e2b714;
            padding: 5px 15px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
        }

        #difficulty-container {
            position: absolute;
            top: 160px;
            left: 40px;
            display: flex;
            gap: 10px;
            align-items: center;
            color: #e2b714;
            font-size: 18px;
            z-index: 30;
        }

        #difficulty-select {
            background: #2c2e31;
            color: #e2b714;
            border: 1px solid #e2b714;
            padding: 5px 10px;
            font-size: 16px;
        }

        #logo {
            position: absolute;
            top: 20px;
            left: 20px;
            width: 100px;
            height: auto;
            opacity: 0.8;
            transition: opacity 0.2s;
        }

        #logo:hover {
            opacity: 1;
        }

#leaderboard-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 35;                    /* above words / timer but below modals */
    background: rgba(226, 183, 20, 0.12);
    border: 1.5px solid#00e6cc;
    color: #e2b714;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.18s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

#leaderboard-btn:hover {
    background: rgba(226, 183, 20, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(226, 183, 20, 0.3);
}

        #leaderboardModal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .leaderboard-wrapper {
            margin-top: 20px;
            width: 100%;
        }

        .leaderboard-header {
            display: grid;
            grid-template-columns: 60px 1fr 100px 100px;
            padding: 10px 15px;
            font-weight: bold;
            border-bottom: 1px solid #444;
            color: #e2b714;
        }

        .leaderboard-body {
            max-height: 350px;
            overflow-y: auto;
        }

        .leaderboard-row {
            display: grid;
            grid-template-columns: 60px 1fr 100px 100px;
            padding: 12px 15px;
            border-bottom: 1px solid #333;
            transition: background 0.2s;
        }

        .leaderboard-row:hover {
            background: rgba(226, 183, 20, 0.08);
        }

        .leaderboard-row span {
            color: #ddd;
        }

        .leaderboard-row .rank {
            color: #e2b714;
            font-weight: bold;
        }

        #leaderboardModal.active {
            display: flex;
        }

        #registerModal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1100;
        }

        #registerModal.active {
            display: flex;
        }
/* ====================== REGISTER BANNER (top of leaderboard) ====================== */
.register-prompt-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(135deg, rgba(226,183,20,0.15), rgba(0,230,204,0.1));
    border: 2px solid #e2b714;
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 18px;
    animation: bannerPulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Subtle moving shimmer behind the banner */
.register-prompt-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 40%;
    height: 300%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.07), transparent);
    transform: skewX(-25deg);
    animation: bannerShine 4s infinite;
}

@keyframes bannerShine {
    0%   { left: -150%; }
    30%  { left: 250%; }
    100% { left: 250%; }
}

@keyframes bannerPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(226,183,20,0.3); }
    50%       { box-shadow: 0 0 35px rgba(226,183,20,0.6); }
}

.register-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.register-banner-icon {
    font-size: 32px;
    animation: rocketFloat 3s ease-in-out infinite;
    flex-shrink: 0;
}

.register-banner-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.register-banner-text strong {
    color: #ffd700;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.register-banner-text span {
    color: #a0d8ff;
    font-size: 12px;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

.register-banner-btn {
    background: linear-gradient(135deg, #e2b714, #ff9900);
    color: #0a0a23;
    border: none;
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(226,183,20,0.5);
}

.register-banner-btn:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 0 35px rgba(255,153,0,0.8);
}

/* Hide when registered */
.register-prompt-banner[style*="none"] { display: none !important; }
        #logo {
            cursor: pointer;
        }

        @keyframes rocket-fly {
            0% {
                transform: translateY(0);
            }

            100% {
                transform: translateY(-12px);
            }
        }

        @keyframes rocket-launch {
            0% {
                transform: translateY(60px) scale(0.6);
                opacity: 0;
            }

            50% {
                transform: translateY(-30px) scale(1.1);
            }

            100% {
                transform: translateY(-15px) scale(1);
                opacity: 1;
            }
        }

        /* ==================== NEW MISSION COMPLETE RESULT UI ==================== */
        #result {
            position: fixed;
            top: 8%;
            left: 50%;
            transform: translateX(-50%) scale(0.95);
            background: linear-gradient(145deg, #0f1b2e, #1a2a44);
            padding: 30px 35px 25px;
            border-radius: 18px;
            border: 2px solid #00e6cc;
            box-shadow: 0 0 50px rgba(0, 230, 204, 0.5);
            text-align: center;
            max-width: 40%;
            width: 90%;
            opacity: 0;
            transition: all 0.4s ease;
            z-index: 2000;
        }

        #result.visible {
            opacity: 1;
            transform: translateX(-50%) scale(1);
        }

        .result-rocket-container {
            margin-bottom: 10px;
        }

        #result-rocket {
            font-size: 70px;
            animation: rocket-orbit 4s ease-in-out infinite;
            filter: drop-shadow(0 20px 50px #ffd700);
        }

        @keyframes rocket-orbit {

            0%,
            100% {
                transform: translateY(0) rotate(-8deg);
            }

            50% {
                transform: translateY(-28px) rotate(8deg);
            }
        }

        .result-title {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 3px;
            color: #00e6cc;
            text-transform: uppercase;
            margin-bottom: 15px;
            text-shadow: 0 0 25px #00e6cc;
            font-family: 'Roboto Mono', monospace;
        }

 /* Main WPM circular container */
.main-stat {
    margin: 0 auto 35px;
    width: 140px;           /* Circle width */
    height: 140px;          /* Circle height */
    border-radius: 50%;     /* Makes it circular */
    background: rgba(255, 215, 0, 0.1);
    border: 3px solid #ffd700;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    text-align: center;
    padding: 10px;
}

/* WPM number */
.main-stat .stat-value {
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 30px #ffd700;
    line-height: 1;
}

/* WPM label below number */
.main-stat .stat-label {
    font-size: 16px;
    color: #ffd700;
    letter-spacing: 1px;
    margin-top: 5px;
    text-transform: uppercase;
}

        /* Secondary metrics */
        .secondary-metrics {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat {
            background: rgba(255, 255, 255, 0.06);
            border-radius: 16px;
            border: 1px solid rgba(0, 230, 204, 0.25);
            transition: all 0.3s ease;
            padding: 10px 14px;
            min-width: 90px;
        }

        .stat:hover {
            transform: translateY(-8px);
            box-shadow: 0 0 30px rgba(0, 230, 204, 0.4);
        }

        .stat .stat-label {
            font-size: 10px;
            color: #a0d8ff;
            text-transform: uppercase;
            letter-spacing: 1.5px;
        }

        .stat .stat-value {
            font-size: 22px;
            font-weight: 700;
        }

        /* Tip box */
        .tip-box {
            background: rgba(0, 230, 204, 0.12);
            border: 1px solid #00e6cc;
            padding: 12px 15px;
            border-radius: 14px;
            margin-bottom: 20px;
            font-size: 13px;
            color: #ddd;
            max-width: 520px;
            margin-left: auto;
            margin-right: auto;
        }

        /* Buttons */
        .result-buttons {
            display: flex;
            gap: 18px;
            justify-content: center;
            flex-wrap: wrap;
        }

        #result #restart {
            background: linear-gradient(to right, #ffd700, #ff9900);
            color: #0a0a23;
            border: none;
            padding: 10px 18px;
            border-radius: 50px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 10px 30px rgba(255, 153, 0, 0.5);
            transition: all 0.25s;
        }

        #result #restart:hover {
            transform: scale(1.08) translateY(-3px);
            box-shadow: 0 15px 40px rgba(255, 153, 0, 0.7);
        }

        .share-button {
            background: transparent;
            color: #00e6cc;
            border: 3px solid #00e6cc;
            padding: 16px 34px;
            border-radius: 50px;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.25s;
        }

        .share-button:hover {
            background: #00e6cc;
            color: #0a0a23;
            transform: scale(1.05);
        }
       /* ==================== PREMIUM COSMIC PLAY GAME BUTTON ==================== */
#play-game {
    position: absolute;
    top: 28px;
    left: 130px;
    z-index: 35;
}

.play-game-btn {
    /* Premium cosmic gradient */
    background: linear-gradient(135deg, #ff9900, #e2b714, #ff9900);
    background-size: 200% 200%;
    color: #0a0a23;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: 'Roboto Mono', monospace;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px #ff9900,
        0 0 40px #e2b714,
        0 8px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Rocket icon styling */
.play-game-btn .rocket-icon {
    font-size: 18px;
    transition: transform 0.4s ease;
}

/* HOVER MAGIC */
.play-game-btn:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 
        0 0 35px #ff9900,
        0 0 70px #e2b714,
        0 15px 35px rgba(226, 183, 20, 0.6);
    background-position: 100% 100%;
}

/* SHINE ANIMATION (the “premium” touch) */
.play-game-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 40%;
    height: 300%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.9),
        transparent
    );
    transform: skewX(-25deg);
    transition: left 0.7s ease;
}

.play-game-btn:hover::before {
    left: 250%;
}

/* Extra glow pulse when page loads */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px #ff9900, 0 0 40px #e2b714; }
    50%      { box-shadow: 0 0 35px #ff9900, 0 0 70px #ffd700; }
}

.play-game-btn {
    animation: glowPulse 3s infinite alternate;
}
#leaderboardModal {
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.4s ease forwards;
}

.leaderboard-modal {
    background: linear-gradient(145deg, #0f1b2e, #1a2a44);
    border: 3px solid #00e6cc;
    box-shadow: 
        0 0 80px rgba(0, 230, 204, 0.6),
        0 0 30px rgba(226, 183, 20, 0.4);
    max-width: 620px;
    width: 92%;
    padding: 30px 25px;
    border-radius: 20px;
    position: relative;
    animation: rocketPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Header */
.leaderboard-header-cosmic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(226, 183, 20, 0.3);
}

.header-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 30px #ffd700;
}

.header-title .rocket {
    font-size: 32px;
    animation: rocketFloat 3s ease-in-out infinite;
}

.total-stats {
    font-size: 14px;
    color: #00e6cc;
    background: rgba(0, 230, 204, 0.1);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid #00e6cc;
}

/* Grid header */
.leaderboard-header-grid {
    display: grid;
    grid-template-columns: 70px 1fr 90px 90px;
    padding: 12px 20px;
    font-weight: 700;
    color: #ffd700;
    border-bottom: 2px solid #00e6cc;
    background: rgba(226, 183, 20, 0.08);
    border-radius: 8px 8px 0 0;
}

/* Body */
.leaderboard-body {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-color: #ffd700 #1a2a44;
}

/* Row */
.leaderboard-row {
    display: grid;
    grid-template-columns: 70px 1fr 90px 90px;
    padding: 14px 20px;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.leaderboard-row:hover {
    transform: scale(1.03) translateY(-2px);
    background: rgba(226, 183, 20, 0.12);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
}

/* Replace the three separate .top1, .top2, .top3 rules with this: */

.leaderboard-row.top {
    background: #00e6cc;
    color: #0a0a23;                   /* dark text for contrast */
    font-weight: 900;
    border-radius: 12px;
    margin: 8px 0;
    box-shadow: 0 0 30px rgba(0, 230, 204, 0.5);
    position: relative;
    overflow: hidden;
}

/* Optional: subtle shine / gradient overlay */
.leaderboard-row.top::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.18) 0%,
        rgba(255,255,255,0) 60%
    );
    pointer-events: none;
}

/* Rank icons */
.leaderboard-row .rank {
    font-size: 22px;
    font-weight: 900;
}

.top1 .rank::after { content: "🥇"; font-size: 18px; margin-left: 8px; }
.top2 .rank::after { content: "🥈"; font-size: 18px; margin-left: 8px; }
.top3 .rank::after { content: "🥉"; font-size: 18px; margin-left: 8px; }

/* Player column with avatar */
.leaderboard-row .player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 34px;
    height: 34px;
    background: #ffd700;
    color: #0a0a23;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    box-shadow: 0 0 15px rgba(255,215,0,0.6);
}

/* You are here highlight */
.leaderboard-row.you {
    border: 3px solid #00e6cc;
    background: rgba(0, 230, 204, 0.15) !important;
    animation: pulseYou 2s infinite;
}

@keyframes pulseYou {
    50% { box-shadow: 0 0 25px #00e6cc; }
}

/* Skeleton loader */
.skeleton-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}
.skeleton-row {
    height: 52px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    animation: skeletonPulse 1.5s infinite;
}

/* Animations */
@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes rocketPop { from { transform: scale(0.6) translateY(80px); } to { transform: scale(1) translateY(0); } }
@keyframes rocketFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes skeletonPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.8; } }

        #leaderboard-btn {
    animation: glowPulse 3s infinite alternate;
}
@keyframes glowPulse {
    from { box-shadow: 0 0 15px #ffd700; }
    to   { box-shadow: 0 0 35px #ffd700; }
}
/* ====================== DIFFICULTY SEGMENTED CONTROL ====================== */
#difficulty-container {
    position: absolute;
    top: 100px;
    left: auto;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 30;
}

.difficulty-label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #e2b714;
    opacity: 0.9;
    text-transform: uppercase;
    white-space: nowrap;
}

.difficulty-group {
    display: flex;
    gap: 6px;
    background: rgba(10, 10, 35, 0.6);
    padding: 5px;
    border-radius: 50px;
    border: 2px solid rgba(226, 183, 20, 0.25);
    box-shadow: 0 0 20px rgba(226, 183, 20, 0.15);
}

.diff-btn {
    background: transparent;
    border: none;
    color: #e2b714;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.diff-btn:hover {
    background: rgba(226, 183, 20, 0.25);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 20px rgba(226, 183, 20, 0.6);
}

.diff-btn.active {
    background: linear-gradient(135deg, #e2b714, #ff9900);
    color: #0a0a23;
    box-shadow: 0 0 30px #00e6cc,
                0 0 15px  rgba(255, 153, 0, 0.8);
    transform: scale(1.08);
}

/* Extra cosmic shine on active button */
.diff-btn.active::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 40%;
    height: 300%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.7),
        transparent
    );
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0%   { left: -150%; }
    20%  { left: 250%; }
    100% { left: 250%; }
}
/* ====================== LEADERBOARD TIME TABS ====================== */
.leaderboard-time-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    background: rgba(10, 10, 35, 0.7);
    padding: 6px;
    border-radius: 50px;
    border: 2px solid rgba(226, 183, 20, 0.3);
    box-shadow: 0 0 25px rgba(226, 183, 20, 0.2);
    margin-bottom: 20px;
}

.time-tab {
    background: transparent;
    border: none;
    color: #e2b714;
    padding: 10px 26px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
}

.time-tab:hover {
    background: rgba(226, 183, 20, 0.3);
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 0 20px rgba(226, 183, 20, 0.6);
}

.time-tab.active {
    background: linear-gradient(135deg, #e2b714, #ff9900);
    color: #0a0a23;
    box-shadow: 0 0 35px #00e6cc,
                0 0 20px rgba(255, 153, 0, 0.8);
    transform: scale(1.08);
}