/* GLOBAL */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0f, #181824, #0f0f18);
    background-attachment: fixed;
    font-family: Poppins, sans-serif;
    color: white;
}

body,
html {
    overflow-x: hidden;
}

/* TITLE */
.title {
    position: absolute;
    top: 20px;
    left: 25px;
    font-size: 28px;
    font-weight: 700;
}

/* RIGHT SIDE PLAYER PANEL */
.player-panel {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* PLAYER ROW */
.player {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;

    /* SMOOTH SLIDING ANIMATION */
    transition: all 0.45s cubic-bezier(0.25, 1, 0.3, 1);
}

/* ICONS */
.pfp {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

/* NAME WIDTH */
.player .name {
    width: 90px;
    font-size: 20px;
    font-weight: 600;
}

/* BUTTONS */
.btn-group {
    display: flex;
    gap: 12px;
}

.plus,
.minus {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #2c2c3a;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: 0.25s;
}

.plus:hover,
.minus:hover {
    background: #47475a;
}

/* GOLD GLOW ON SCORE */
.gold-card {
    animation: goldGlow 0.9s ease-out;
}

@keyframes goldGlow {
    0% {
        box-shadow: 0 0 0px gold;
    }

    50% {
        box-shadow: 0 0 18px gold;
    }

    100% {
        box-shadow: 0 0 0px gold;
    }
}

/* GOLD GLOW FOR TOP PLAYER ONLY */
.top-player {
    border: 2px solid gold !important;
    box-shadow: 0 0 14px gold;
}

/* BOTTOM SCORE SECTION */
.score-section {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 90px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);

    display: flex;
    justify-content: center;
    align-items: center;
}

.score-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
}

.score-box {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    backdrop-filter: blur(3px);
    height: 42px;
}

.pfp.small {
    width: 32px;
    height: 32px;
}

.name.small {
    font-size: 16px;
    font-weight: 600;
    width: 55px;
}

.score {
    font-size: 18px;
    font-weight: 700;
    width: 26px;
    text-align: center;
}

/* SCORE POP ANIMATION */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.pop {
    animation: pop 0.3s ease-out;
}

/* KING ICON */
.crown {
    margin-left: 6px;
    font-size: 20px;
    filter: drop-shadow(0 0 4px gold);
}

/* SECTION DOTS (BIG) */
.section-progress {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
}

.section-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

/* Current section */
.section-dot.active {
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff;
}

/* Completed sections */
.section-dot.completed {
    background: #4da3ff;
    box-shadow: 0 0 12px #4da3ff;
}

/* Upcoming section */
.section-dot.upcoming {
    background: rgba(255, 255, 255, 0.1);
}


/* ROUND DOTS (SMALL) */
.round-progress {
    position: absolute;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.round-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

/* Current round */
.round-dot.active {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Completed rounds */
.round-dot.completed {
    background: #4da3ff;
    box-shadow: 0 0 10px #4da3ff;
}

/* Upcoming rounds */
.round-dot.upcoming {
    background: rgba(255, 255, 255, 0.1);
}

/* ROUND SYSTEM LAYOUT */
.round-system {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
}

.round-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.round-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.round-dots {
    display: flex;
    gap: 6px;
}

/* Dots */
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
}

/* Active dot */
.dot.active {
    background: #fff;
    box-shadow: 0 0 8px #fff;
}

/* Completed dot */
.dot.completed {
    background: #4da3ff;
    box-shadow: 0 0 8px #4da3ff;
}

/* Upcoming dot */
.dot.upcoming {
    opacity: 0.3;
}

/* IMAGE CANVAS AREA */
.canvas-area {
    position: absolute;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 350px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.canvas-area img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 14px;
}

/* NEXT BUTTON */
.next-btn-container {
    position: absolute;
    top: 550px;
    left: 50%;
    transform: translateX(-50%);
}

#nextBtn {
    padding: 12px 30px;
    background: #5c5cff;
    border: none;
    color: white;
    font-size: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

#nextBtn:hover {
    background: #3d3dff;
}

/* lock icon hidden by default */
.round-label .lock {
    opacity: 0.25;
    margin-left: 6px;
    font-size: 16px;
    transition: 0.2s;
}

/* upcoming sections */
.round-block.upcoming .round-label {
    opacity: 0.3;
}

.round-block.upcoming .lock {
    opacity: 1;
    /* lock visible */
}

/* completed sections */
.round-block.completed .round-label {
    opacity: 0.4;
}

.round-block.completed .lock {
    opacity: 0;
    /* hide lock on completed */
}

/* active section */
.round-block.active .round-label {
    opacity: 1;
}

.round-block.active .lock {
    opacity: 0;
    /* no lock for active */
}

/* WINNER POPUP BACKDROP */
.winner-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* WINNER CARD */
.winner-card {
    width: 380px;
    background: rgba(255, 255, 255, 0.06);
    padding: 30px 25px;
    border-radius: 18px;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    animation: popIn 0.4s ease;
}

/* WINNER IMAGE */
.winner-img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid gold;
    box-shadow: 0 0 20px gold;
    margin-bottom: 20px;
}

/* WINNER NAME */
.winner-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* WINNER SCORE */
.winner-score {
    font-size: 20px;
    opacity: 0.8;
    margin-bottom: 25px;
}

/* CLOSE BUTTON */
.close-btn {
    padding: 10px 20px;
    background: gold;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #000;
    transition: 0.2s;
}

.close-btn:hover {
    filter: brightness(1.2);
}

@keyframes popIn {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* FULLSCREEN CONFETTI CANVAS */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

/* CINEMATIC FADE */
.winner-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(14px);
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* WINNER CARD */
.winner-card {
    width: 420px;
    background: rgba(255, 255, 255, 0.07);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
    animation: cardFadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(40px);
}

/* WINNER IMAGE: glowing pulsing ring */
.winner-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid gold;
    box-shadow: 0 0 25px gold;
    animation: winnerPulse 2s infinite ease-in-out;
}

/* WINNER NAME */
.winner-name {
    font-size: 34px;
    font-weight: 800;
    margin-top: 16px;
    text-shadow: 0 0 14px gold;
    animation: textPop 0.5s ease-out forwards;
}

/* WINNER SCORE (animated count-up) */
.winner-score {
    font-size: 22px;
    margin-top: 8px;
    opacity: 0.85;
}

/* FINAL RESULTS HEADER */
.final-heading {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    animation: headingSlide 0.8s ease-out forwards;
    opacity: 0;
}

/* CROWN DROP ANIMATION */
#winnerCrown {
    font-size: 42px;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    animation: crownDrop 0.7s ease forwards;
    opacity: 0;
}

/* CLOSE BUTTON */
.close-btn {
    padding: 10px 26px;
    margin-top: 22px;
    background: gold;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    color: #000;
    transition: 0.2s;
}

.close-btn:hover {
    filter: brightness(1.2);
}

/* ANIMATIONS */
@keyframes winnerPulse {
    0% {
        box-shadow: 0 0 20px gold;
    }

    50% {
        box-shadow: 0 0 40px gold;
    }

    100% {
        box-shadow: 0 0 20px gold;
    }
}

@keyframes cardFadeIn {
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes headingSlide {
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes crownDrop {
    0% {
        transform: translate(-50%, -50px);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 10px);
        opacity: 1;
    }
}

/* LEADERBOARD CARD */
.leaderboard-card {
    width: 340px;
    background: rgba(255, 255, 255, 0.08);
    padding: 25px 20px;
    margin-left: 40px;
    border-radius: 16px;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.6s ease;
}

.leaderboard-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* EACH ROW */
.lb-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    border-radius: 10px;
}

.lb-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.lb-name {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.lb-score {
    font-size: 20px;
    font-weight: bold;
}

/* SHOW ANIMATION */
.leaderboard-card.show {
    opacity: 1;
    transform: translateX(0);
}

/* WINNER POPUP BACKGROUND */
.winner-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(14px);
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* WINNER CARD */
.winner-card {
    width: 420px;
    background: rgba(255, 255, 255, 0.07);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
    animation: cardFadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(40px);
}

/* LEADERBOARD — hidden at start */
.leaderboard-card {
    margin-top: 26px;
    background: rgba(255, 255, 255, 0.08);
    padding: 20px 18px;
    border-radius: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.leaderboard-card.show {
    opacity: 1;
    transform: translateY(0);
}

.leaderboard-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    border-radius: 10px;
}

.lb-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.lb-name {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.lb-score {
    font-size: 18px;
    font-weight: 700;
}

/* Smaller Leaderboard Card */
.leaderboard-card {
    width: 260px;
    /* smaller width */
    background: rgba(255, 255, 255, 0.08);
    padding: 16px 14px;
    /* tighter padding */
    margin-top: 22px;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.leaderboard-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* Smaller title */
.leaderboard-title {
    font-size: 18px;
    /* smaller font */
    font-weight: 700;
    margin-bottom: 12px;
}

/* Smaller rows */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 10px;
    /* smaller padding */
    border-radius: 10px;
}

/* Smaller images */
.lb-img {
    width: 38px;
    /* smaller */
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

/* Smaller text */
.lb-name {
    flex: 1;
    font-size: 16px;
    /* smaller font */
    font-weight: 600;
}

.lb-score {
    font-size: 16px;
    /* smaller font */
    font-weight: 700;
}

/* BLUR OVERLAY */
.blur-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    transition: 0.4s ease;
    z-index: 3;
}

/* REVEAL BUTTON */
.reveal-btn {
    margin-top: 15px;
    padding: 12px 25px;
    background: #6a5cff;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.25s ease;
}

.reveal-btn:hover {
    background: #5147ff;
}

/* TIMER */
.timer {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px #fff;
}

.canvas-area {
    position: relative;
    /* required so absolute children (blurOverlay) are positioned correctly */
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    pointer-events: none;
    z-index: 3;
}

.canvas-area img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.canvas-area {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* IMAGE */
.canvas-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

/* BLUR ONLY ON IMAGE */
.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
    /* above image, below reveal button */
    border-radius: 12px;
}

/* CENTER REVEAL BUTTON */
.reveal-btn {
    position: absolute;
    z-index: 3;
    /* highest: above blur */
    padding: 12px 25px;
    background: #6a5cff;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.25s ease;
}

.reveal-btn:hover {
    background: #5147ff;
}

/* TIMER TOP-LEFT */
.timer {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    /* above blur */
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 8px #000;
}

.canvas-area {
    position: relative;
    width: 100%;
    height: 500px;
}

.center-buttons {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    /* adjust vertical centering */
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* REVEAL button */
.reveal-btn {
    padding: 12px 25px;
    background: #6a5cff;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.25s ease;
    z-index: 4;
}

.reveal-btn:hover {
    background: #5147ff;
}

/* NEXT button */
.next-btn {
    padding: 12px 35px;
    background: #8256ff;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: 0.25s ease;
    z-index: 4;
}

.next-btn:hover {
    background: #6d45ff;
}

.next-top {
    position: absolute;
    right: -132px;
    top: 18px;
    padding: 10px 25px;
    background: #6c63ff;
    color: #fff;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    z-index: 20;
    transition: 0.3s ease;
}

.next-top:hover {
    background: #5a52ff;
}

.timer {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    animation: timerPulse 1s infinite ease-in-out;
}

@keyframes timerPulse {
    0% {
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    }

    50% {
        box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
    }

    100% {
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    }
}

/* TIMER turns red when finished */
.timer.red {
    color: #ff4b4b;
    border-color: rgba(255, 80, 80, 0.5);
    box-shadow: 0 0 14px rgba(255, 80, 80, 0.9);
    animation: timerEndPulse 0.8s infinite;
}

@keyframes timerEndPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* FLASH RED EFFECT ON IMAGE */
.flash-red {
    animation: flashRedEffect 0.6s ease;
}

@keyframes flashRedEffect {
    0% {
        filter: brightness(1) saturate(1);
    }

    20% {
        filter: brightness(2) saturate(2) hue-rotate(-20deg) drop-shadow(0 0 25px red);
    }

    100% {
        filter: brightness(1) saturate(1);
    }
}

/* When timer ends */
.timer.red {
    color: #ff3b3b;
    border-color: rgba(255, 80, 80, 0.4);
    box-shadow: 0 0 10px rgba(255, 60, 60, 0.9);
    animation: timerEndPulse 0.8s infinite ease-in-out;
}

@keyframes timerEndPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Flash red effect on image */
.flash-red {
    animation: flashRedEffect 0.6s ease;
}

@keyframes flashRedEffect {
    0% {
        filter: brightness(1);
    }

    20% {
        filter: brightness(2) saturate(2) hue-rotate(-20deg) drop-shadow(0 0 20px red);
    }

    100% {
        filter: brightness(1);
    }
}

/* ===============================
   BLUR OVERLAY (IMAGE ONLY)
   =============================== */

#blurOverlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(14px);
    background: rgba(0, 0, 0, 0.45);

    z-index: 2;
    /* BELOW timer */
    pointer-events: none;
}

/* FADE-OFF BLUR USED ON REVEAL */
.blur-overlay.fade-off {
    transition: backdrop-filter 0.4s ease, background 0.4s ease;
    backdrop-filter: blur(0px);
    background: rgba(0, 0, 0, 0);
}

.round-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.round-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}



.round-block.upcoming .round-label {
    letter-spacing: 0.5px;
}

.round-block.upcoming .lock {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
}

.round-block.upcoming .dot {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.round-block.active {
    opacity: 1;
    filter: none;
}

.round-block.active .round-label {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.round-block.active .dot.active {
    background: #ffffff;
    box-shadow: 0 0 14px #ffffff;
    animation: activePulse 1.2s infinite ease-in-out;
}

@keyframes activePulse {
    0% {
        box-shadow: 0 0 8px #fff;
    }

    50% {
        box-shadow: 0 0 18px #fff;
    }

    100% {
        box-shadow: 0 0 8px #fff;
    }
}

.round-block.completed {
    opacity: 0.75;
    filter: none;
}

.round-block.completed .round-label {
    color: #7fb7ff;
}

.round-block.completed .dot.completed {
    background: linear-gradient(135deg, #4da3ff, #7fd0ff);
    box-shadow: 0 0 10px rgba(100, 180, 255, 0.8);
}

.round-label .lock {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.round-block.active .lock,
.round-block.completed .lock {
    opacity: 0;
    transform: scale(0.7);
}



.round-block.upcoming .round-label,
.round-block.upcoming .round-dots {
    opacity: 0.35;
    filter: grayscale(0.6);
}

/* ===========================
   REFEREE HIGHLIGHT
   =========================== */
.referee-active {
    border: 2px solid gold !important;
    box-shadow: 0 0 18px gold !important;
    transform: scale(1.05);
    z-index: 5;
}

.referee-active .name {
    color: gold;
    font-weight: 800;
}

/* ===========================
   REFEREE LABEL (BOTTOM CARD)
   =========================== */
.referee-label {
    font-size: 12px;
    font-weight: 800;
    color: #ff3b3b;
    margin-left: 6px;
    letter-spacing: 0.8px;
    text-shadow: 0 0 6px rgba(255, 60, 60, 0.7);
}

/* ===============================
   MAIN FRAME IMAGE – FIXED RATIO
   =============================== */

.frame-container {
    width: 100%;
    max-width: 1100px;
    /* adjust if needed */
    aspect-ratio: 16 / 9;
    /* 🔥 cinematic ratio */
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

#frameImage {
    width: 50%;
    height: 100%;
    object-fit: cover;
    /* 🔥 KEY LINE */
    object-position: center;
    /* always center subject */
    display: block;
}

/* ===============================
   DISABLE TEXT SELECTION
   =============================== */

* {
    -webkit-user-select: none;
    /* Chrome, Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Edge */
    user-select: none;
    /* Standard */
}

/* ===============================
   NEXT BUTTON IMAGE ANIMATION
   =============================== */

#frameImage {
    transition:
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.45s ease;
}

/* outgoing image */
.frame-animate-out {
    transform: scale(1.08);
    opacity: 0;
}

/* incoming image */
.frame-animate-in {
    transform: scale(0.96);
    opacity: 0;
}

/* ===============================
   SLIDE TRANSITION FOR FRAME IMAGE
   =============================== */

#frameImage {
    transition:
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.45s ease;
}

/* slide current image to left */
.frame-slide-out {
    transform: translateX(-60px);
    opacity: 0;
}

/* new image comes from right */
.frame-slide-in {
    transform: translateX(60px);
    opacity: 0;
}

/* ===============================
   TIMER CIRCULAR PROGRESS
   =============================== */

.timer-circle {
    position: relative;
    width: 80px;
    height: 80px;
}

.timer-ring {
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 6;
}

.timer-ring-progress {
    fill: none;
    stroke: #ffd700;
    stroke-width: 6;
    stroke-linecap: round;

    stroke-dasharray: 226;
    stroke-dashoffset: 0;

    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.timer-circle.timeout .timer-ring-progress {
    stroke: #ff3b3b;
}

.timer-circle.timeout .timer-text {
    color: #ff3b3b;
}

/* ===============================
   TIMER ALWAYS ABOVE BLUR
   =============================== */
/* ===============================
   BLUR OVERLAY (IMAGE ONLY)
   =============================== */

#blurOverlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(14px);
    background: rgba(0, 0, 0, 0.45);

    z-index: 2;
    /* BELOW timer */
    pointer-events: none;
}

.timer-circle {
    position: relative;
    z-index: 5;
    /* ABOVE blur overlay */
}

/* ===============================
   FULLSCREEN LEADERBOARD VIEW
   =============================== */

.winner-popup {
    position: fixed;
    inset: 0;
    background: #0a0a0f;
    /* blank screen */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* Center card but allow breathing space */
.winner-card {
    width: 100%;
    max-width: 520px;
    background: transparent;
    /* remove card feel */
    box-shadow: none;
    padding: 0;
    text-align: center;
}

/* Final heading */
.final-heading {
    font-size: 34px;
    margin-bottom: 20px;
}

/* Winner image */
.winner-img {
    width: 180px;
    height: 180px;
    margin-bottom: 10px;
}

/* Leaderboard = main focus */
.leaderboard-card {
    width: 100%;
    max-width: 420px;
    margin: 30px auto 0;
    opacity: 1;
    transform: none;
}

/* Close button at bottom */
.close-btn {
    margin-top: 40px;
}

/* ===============================
   ZOOM OUT LEADERBOARD BY 20%
   =============================== */

.winner-popup {
    display: none;
    justify-content: center;
    align-items: center;
}

.winner-popup.show {
    display: flex;
}

/* Scale everything inside */
.winner-card {
    transform: scale(0.8);
    /* 🔥 20% zoom out */
    transform-origin: center center;
}

/* ===============================
   FORCE ZOOM OUT FINAL RESULTS
   =============================== */

/* Fullscreen takeover */
#winnerPopup {
    position: fixed !important;
    inset: 0 !important;
    display: none;
    justify-content: center;
    align-items: center;
    background: #0a0a0f !important;
    z-index: 999999 !important;
}

/* Nuclear scale force */
#winnerPopup .winner-card {
    transform: scale(0.8) !important;
    /* 🔥 HARD 20% ZOOM OUT */
    transform-origin: center center !important;
}

/* Prevent parent scaling conflicts */
#winnerPopup * {
    transform-style: flat !important;
}

/* ===============================
   LEFT SUPPORT BLOCK (NO SHIFT)
   =============================== */

.support-block {
    position: fixed;
    left: -570px;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;

    z-index: 999998;
    /* below popup, above bg */
    pointer-events: auto;
}

/* Top text */
.support-text {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    opacity: 0.9;
}

/* QR Image */
.support-qr {
    width: 220px;
    height: auto;
    border-radius: 14px;
    background: #fff;
    padding: 10px;

    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.25),
        0 0 40px rgba(255, 215, 0, 0.15);
}

/* Bottom text */
.support-footer {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #ffd700;
    line-height: 1.4;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

/* ===============================
   TEXT-ONLY ROUND CARD (21–30)
   =============================== */
.text-card {
    display: none;
    max-width: 80%;
    padding: 40px 50px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border-radius: 18px;

    font-size: 34px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;

    color: #fff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);

    box-shadow: 0 0 35px rgba(0, 0, 0, 0.6);
    animation: textPopIn 0.4s ease;
    z-index: 4;
}

@keyframes textPopIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===============================
   TEXT-ONLY ROUND CARD (21–30)
   =============================== */
.text-card {
    display: none;
    width: 100%;
    max-width: 100%;
    padding: 36px 60px;

    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    border-radius: 18px;

    font-size: 32px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;

    color: #ffffff;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.35);

    box-shadow: 0 0 40px rgba(0, 0, 0, 0.65);
    z-index: 4;

    /* 🔥 IMPORTANT */
    white-space: normal;
    word-break: break-word;
}

/* Text blurred before reveal */
.text-card.blurred {
    filter: blur(10px);
    opacity: 0.6;
}

/* Referee will answer special style */
.round-message.referee-call {
    color: #FFD700;
    /* yellow */
    border: 2px solid rgba(180, 180, 180, 0.32);
    /* grey @ 32% */
    padding: 18px 28px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 22px rgba(255, 215, 0, 0.18);
}