:root {
    color-scheme: dark;
    --bg-dark: #031609;
    --bg-glow: rgba(28, 255, 165, 0.18);
    --primary: #1aff85;
    --primary-strong: #24ff6d;
    --accent: #8dffbd;
    --text: #f4fff9;
    --text-muted: rgba(244, 255, 249, 0.65);
    --card-bg: rgba(4, 30, 16, 0.65);
    --card-border: rgba(74, 255, 173, 0.35);
    --blur: 30px;
    --max-width: 980px;
}

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

body {
    min-height: 100vh;
    font-family: 'Orbitron', sans-serif;
    background: radial-gradient(circle at top, #043016, #031609 60%);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
}

.background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.flame-layer {
    position: absolute;
    width: 160%;
    height: 160%;
    top: -30%;
    left: -30%;
    background: conic-gradient(from 120deg at 50% 50%,
        rgba(141, 255, 189, 0.2) 0deg,
        rgba(26, 255, 133, 0.38) 60deg,
        rgba(10, 180, 90, 0.3) 120deg,
        rgba(141, 255, 189, 0.14) 180deg,
        rgba(26, 255, 133, 0.35) 300deg,
        rgba(10, 180, 90, 0.28) 360deg);
    filter: blur(var(--blur));
    mix-blend-mode: screen;
    animation: rotateFlame 20s linear infinite;
}

.flame-layer--2 {
    animation-duration: 28s;
    animation-direction: reverse;
    opacity: 0.8;
}

.flame-layer--3 {
    animation-duration: 36s;
    animation-direction: alternate;
    opacity: 0.6;
}

.wrapper {
    position: relative;
    z-index: 1;
    width: min(92%, var(--max-width));
    padding: 4rem 3.5rem 3rem;
    border-radius: 32px;
    background: radial-gradient(circle at 20% -10%, rgba(36, 255, 109, 0.22), transparent 65%),
        linear-gradient(155deg, rgba(4, 30, 16, 0.92), rgba(3, 22, 9, 0.7));
    border: 1px solid rgba(36, 255, 109, 0.28);
    box-shadow: 0 35px 90px rgba(36, 255, 153, 0.22), inset 0 0 140px rgba(26, 255, 133, 0.16);
    backdrop-filter: blur(22px);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.logo {
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35rem;
    color: var(--primary);
    text-shadow: 0 0 18px rgba(36, 255, 153, 0.8);
}

.logo span {
    color: var(--accent);
}

.nav-buttons {
    display: flex;
    gap: 0.85rem;
}

.nav-button {
    border: none;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(140deg, rgba(7, 72, 38, 0.95), rgba(18, 110, 62, 0.88));
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(36, 255, 133, 0.25);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: buttonPulse 6s ease-in-out infinite;
}

.nav-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% -10%, rgba(36, 255, 153, 0.6), transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 120%;
    height: 100%;
    background: linear-gradient(120deg, transparent 35%, rgba(141, 255, 189, 0.18) 50%, transparent 65%);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.nav-button:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 0 32px rgba(36, 255, 153, 0.38);
}

.nav-button:hover::before {
    opacity: 1;
}

.nav-button:hover::after {
    left: 130%;
}


.leaderboard {
    position: relative;
    padding: 2.8rem;
    border-radius: 26px;
    background: rgba(4, 30, 16, 0.72);
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 60px rgba(36, 255, 153, 0.22);
    overflow: hidden;
}

.leaderboard__halo {
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 50% 0%, rgba(36, 255, 153, 0.35), transparent 55%),
        radial-gradient(circle at 10% 90%, rgba(141, 255, 189, 0.22), transparent 60%),
        radial-gradient(circle at 90% 80%, rgba(26, 255, 133, 0.2), transparent 55%);
    filter: blur(60px);
    animation: pulseGlow 8s ease-in-out infinite;
}

.leaderboard__header {
    position: relative;
    text-align: center;
    margin-bottom: 2.6rem;
    z-index: 1;
}

.promo-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(7, 72, 38, 0.92), rgba(18, 110, 62, 0.86));
    border: 1px solid rgba(36, 255, 153, 0.32);
    box-shadow: 0 10px 25px rgba(36, 255, 153, 0.18);
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.18rem;
    margin-bottom: 1.6rem;
    position: relative;
    overflow: hidden;
}

.promo-tag::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(120deg, transparent 35%, rgba(141, 255, 189, 0.22) 55%, transparent 70%);
    transform: skewX(-20deg);
    animation: tagSweep 7s linear infinite;
}

.promo-label {
    color: var(--text-muted);
}

.promo-code {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.3rem;
}

.promo-context {
    color: var(--text-muted);
}

.leaderboard__header h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: 0.2rem;
    text-transform: uppercase;
}

.leaderboard__header p {
    margin-top: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.18rem;
}


.leaderboard__meta {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2.4rem;
    z-index: 1;
}

.leaderboard__timer {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 2.6rem;
    z-index: 1;
}

.timer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.4rem 2.8rem;
    border-radius: 20px;
    background: rgba(4, 30, 16, 0.6);
    border: 1px solid rgba(36, 255, 153, 0.24);
    box-shadow: inset 0 0 60px rgba(26, 255, 133, 0.18), 0 20px 45px rgba(36, 255, 153, 0.18);
    text-transform: uppercase;
    letter-spacing: 0.18rem;
}

.timer-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.2rem;
}

.timer-values {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    color: var(--text);
}

.timer-values.timer-ended {
    opacity: 0.7;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.timer-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(36, 255, 153, 0.4);
    min-width: 3.8rem;
    text-align: center;
}

.timer-unit-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.16rem;
}

.timer-separator {
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.7;
}

.meta-card {
    padding: 1.4rem 1.6rem;
    border-radius: 18px;
    background: rgba(4, 30, 16, 0.55);
    border: 1px solid rgba(36, 255, 153, 0.22);
    box-shadow: inset 0 0 50px rgba(26, 255, 133, 0.16);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    letter-spacing: 0.14rem;
}

.meta-card--accent {
    border-color: rgba(141, 255, 189, 0.3);
    box-shadow: inset 0 0 60px rgba(141, 255, 189, 0.22);
}

.meta-label {
    color: var(--text-muted);
    font-size: 0.84rem;
    text-transform: uppercase;
}

.meta-value {
    font-size: 1.4rem;
    font-weight: 600;
}

.leaderboard__table {
    display: grid;
    gap: 0.85rem;
    position: relative;
    z-index: 1;
}

.leaderboard__row {
    display: grid;
    grid-template-columns: 1fr 3fr 2fr 2fr;
    padding: 1.05rem 1.3rem;
    border-radius: 16px;
    background: rgba(4, 30, 16, 0.52);
    border: 1px solid rgba(26, 255, 133, 0.18);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 32px rgba(36, 255, 153, 0.12);
    color: var(--text);
    letter-spacing: 0.12rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leaderboard__row--head {
    font-weight: 600;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(36, 255, 153, 0.25), rgba(26, 255, 133, 0.2));
    border: 1px solid rgba(141, 255, 189, 0.28);
    box-shadow: inset 0 0 45px rgba(26, 255, 133, 0.26);
}

.leaderboard__row:not(.leaderboard__row--head) {
    position: relative;
    overflow: hidden;
}

.leaderboard__row:not(.leaderboard__row--head)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(36, 255, 153, 0), rgba(36, 255, 153, 0.35), rgba(36, 255, 153, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leaderboard__row:not(.leaderboard__row--head):hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(36, 255, 153, 0.28);
}

.leaderboard__row:not(.leaderboard__row--head):hover::after {
    opacity: 0.85;
}

.leaderboard__prize {
    position: relative;
    margin-top: 2.8rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    z-index: 1;
}

.prize-card {
    padding: 1.1rem 1.3rem;
    border-radius: 16px;
    background: rgba(4, 30, 16, 0.6);
    border: 1px solid rgba(26, 255, 133, 0.22);
    box-shadow: inset 0 0 32px rgba(36, 255, 153, 0.16);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    letter-spacing: 0.1rem;
}

.prize-card--top {
    border-color: rgba(141, 255, 189, 0.34);
    box-shadow: inset 0 0 40px rgba(141, 255, 189, 0.28);
}

.prize-rank {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: var(--accent);
}

.prize-amount {
    font-size: 1.1rem;
}

.footer {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.admin-access {
    display: flex;
    justify-content: center;
}

.admin-access__trigger {
    font-size: 0.58rem;
    letter-spacing: 0.25rem;
    text-transform: uppercase;
    padding: 0.45rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(36, 255, 153, 0.35);
    background: rgba(4, 30, 16, 0.75);
    color: var(--accent);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 0 12px rgba(36, 255, 153, 0.22);
}

.admin-access__trigger:hover,
.admin-access__trigger:focus {
    outline: none;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 0 18px rgba(36, 255, 153, 0.32);
    color: var(--text);
    border-color: rgba(141, 255, 189, 0.45);
}

.admin-login-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-login-modal.is-open {
    display: flex;
}

.admin-login-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
}

.admin-login-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(90%, 380px);
    padding: 2rem;
    border-radius: 20px;
    background: rgba(4, 30, 16, 0.93);
    border: 1px solid rgba(36, 255, 153, 0.32);
    box-shadow: 0 25px 60px rgba(36, 255, 153, 0.28);
    color: var(--text);
}

.admin-login-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.8rem;
    height: 1.8rem;
    border: none;
    border-radius: 50%;
    background: rgba(36, 255, 153, 0.18);
    cursor: pointer;
}

.admin-login-modal__close::before,
.admin-login-modal__close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 2px;
    background: var(--text);
}

.admin-login-modal__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.admin-login-modal__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.admin-login-modal__subtitle {
    margin-top: 0.4rem;
    margin-bottom: 1.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.admin-login-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.admin-login-modal__field label {
    font-size: 0.78rem;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: var(--accent);
}

.admin-login-modal__field input {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(36, 255, 153, 0.28);
    background: rgba(4, 30, 16, 0.6);
    color: var(--text);
    font-size: 0.9rem;
}

.admin-login-modal__field input:focus {
    outline: none;
    border-color: rgba(141, 255, 189, 0.5);
    box-shadow: 0 0 0 4px rgba(36, 255, 153, 0.18);
}

.admin-login-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.admin-login-modal__error {
    margin-top: 1rem;
    font-size: 0.78rem;
    color: #ff8080;
    min-height: 1em;
    letter-spacing: 0.08rem;
}

/* Shared small buttons for modal */
.btn {
    padding: 0.65rem 1.1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(140deg, rgba(7, 72, 38, 0.95), rgba(18, 110, 62, 0.88));
    color: var(--text);
    border: 1px solid rgba(36, 255, 153, 0.32);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(36, 255, 153, 0.28);
}

.btn-secondary {
    background: rgba(4, 30, 16, 0.75);
    color: var(--accent);
    border: 1px solid rgba(36, 255, 153, 0.24);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(36, 255, 153, 0.22);
}
.socials {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-credit {
    font-size: 0.72rem;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.heart {
    color: var(--accent);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(140deg, rgba(7, 72, 38, 0.95), rgba(18, 110, 62, 0.88));
    border: 1px solid rgba(36, 255, 153, 0.32);
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.18rem;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 0 18px rgba(36, 255, 133, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% -10%, rgba(36, 255, 153, 0.6), transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.social-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 120%;
    height: 100%;
    background: linear-gradient(120deg, transparent 35%, rgba(141, 255, 189, 0.18) 50%, transparent 65%);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 0 28px rgba(36, 255, 153, 0.32);
    color: var(--accent);
}

.social-link:hover::after {
    left: 130%;
}

@keyframes rotateFlame {
    from {
        transform: rotate(0deg) scale(1.1);
    }
    to {
        transform: rotate(360deg) scale(1.1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes buttonPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(36, 255, 153, 0.18));
    }
    40% {
        filter: drop-shadow(0 0 16px rgba(36, 255, 153, 0.28));
    }
    70% {
        filter: drop-shadow(0 0 12px rgba(141, 255, 189, 0.22));
    }
}

@keyframes tagSweep {
    0% {
        left: -120%;
    }
    55% {
        left: 120%;
    }
    100% {
        left: 120%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 2rem 0;
    }

    .wrapper {
        padding: 2.6rem 1.9rem 2.2rem;
    }

    .hero {
        flex-direction: column;
        gap: 1.6rem;
    }

    .leaderboard {
        padding: 2.1rem;
    }

    .leaderboard__row {
        grid-template-columns: 1fr 2.3fr 1.8fr 1.9fr;
        font-size: 0.92rem;
        letter-spacing: 0.08rem;
    }
}

@media (max-width: 520px) {
    .leaderboard__row {
        grid-template-columns: 1.2fr 1.8fr;
        grid-template-areas:
            "rank player"
            "wager prize";
        gap: 0.35rem 1rem;
        text-align: left;
    }

    .leaderboard__row span:nth-child(1) {
        grid-area: rank;
    }

    .leaderboard__row span:nth-child(2) {
        grid-area: player;
    }

    .leaderboard__row span:nth-child(3) {
        grid-area: wager;
    }

    .leaderboard__row span:nth-child(4) {
        grid-area: prize;
    }

    .leaderboard__meta {
        grid-template-columns: 1fr;
    }

    .leaderboard__prize {
        grid-template-columns: 1fr;
    }
}
