/* Arcade game leaderboards — dark KenoGPT shell with per-game themes */

html.arcade-lb-mode main {
    padding-top: var(--site-header-height, 72px);
    padding-bottom: 0;
}

html.arcade-lb-mode .ud-footer,
html.arcade-lb-mode footer.site-footer {
    display: none;
}

.arcade-lb {
    position: relative;
    min-height: calc(100vh - var(--site-header-height, 72px));
    overflow: hidden;
    color: #eef4ff;
}

.arcade-lb-inner {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 36px) clamp(14px, 4vw, 24px) 48px;
}

/* ----- Shared hero ----- */
.arcade-lb-hero {
    text-align: center;
    margin-bottom: 22px;
}

.arcade-lb-hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.arcade-lb-title {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 1000;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.05;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.arcade-lb-tagline {
    margin: 0 auto;
    max-width: 540px;
    color: rgba(238, 244, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.5;
}

.arcade-lb-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.arcade-lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.arcade-lb-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.arcade-lb-btn-primary {
    color: #111;
    border: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.arcade-lb-btn-ghost {
    color: #eef4ff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.arcade-lb-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ----- Podium ----- */
.arcade-lb-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 24px;
}

.arcade-lb-podium-slot {
    text-align: center;
    padding: 16px 10px 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(4, 10, 20, 0.55);
    backdrop-filter: blur(8px);
}

.arcade-lb-podium-slot.rank-1 {
    order: 2;
    transform: translateY(-8px);
    min-height: 148px;
}

.arcade-lb-podium-slot.rank-2 {
    order: 1;
}

.arcade-lb-podium-slot.rank-3 {
    order: 3;
}

.arcade-lb-podium-medal {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 8px;
}

.arcade-lb-podium-name {
    font-weight: 800;
    font-size: 0.92rem;
    margin-bottom: 6px;
    word-break: break-word;
}

.arcade-lb-podium-name a {
    color: inherit;
    text-decoration: none;
}

.arcade-lb-podium-name a:hover {
    text-decoration: underline;
}

.arcade-lb-podium-score {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 900;
}

.arcade-lb-podium-rank {
    margin-top: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.65;
}

/* ----- Board ----- */
.arcade-lb-board {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 11, 22, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.arcade-lb-board-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.arcade-lb-board-icon {
    font-size: 1.1rem;
}

.arcade-lb-rows {
    display: flex;
    flex-direction: column;
}

.arcade-lb-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    grid-template-areas:
        "rank player score"
        "rank player date";
    gap: 2px 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    align-items: center;
}

.arcade-lb-row:last-child {
    border-bottom: 0;
}

.arcade-lb-row-rank {
    grid-area: rank;
}

.arcade-lb-row-player {
    grid-area: player;
    min-width: 0;
}

.arcade-lb-row-score {
    grid-area: score;
    text-align: right;
}

.arcade-lb-row-date {
    grid-area: date;
    text-align: right;
    font-size: 0.75rem;
    color: rgba(238, 244, 255, 0.5);
}

.arcade-lb-rank-badge,
.arcade-lb-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.85rem;
}

.arcade-lb-rank-num {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(238, 244, 255, 0.7);
}

.arcade-lb-player-name {
    display: block;
    font-weight: 800;
    color: #eef4ff;
    text-decoration: none;
    word-break: break-word;
}

.arcade-lb-player-name:hover {
    text-decoration: underline;
}

.arcade-lb-player-handle {
    display: block;
    font-size: 0.78rem;
    color: rgba(238, 244, 255, 0.48);
}

.arcade-lb-score-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(238, 244, 255, 0.45);
}

.arcade-lb-score-value {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 900;
}

.arcade-lb-row.row-gold {
    background: linear-gradient(90deg, rgba(255, 215, 67, 0.12), transparent 55%);
}

.arcade-lb-row.row-silver {
    background: linear-gradient(90deg, rgba(192, 202, 220, 0.1), transparent 55%);
}

.arcade-lb-row.row-bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.12), transparent 55%);
}

.arcade-lb-row.row-gold .arcade-lb-rank-badge {
    background: linear-gradient(180deg, #ffe566, #d4a017);
    color: #1a1200;
    box-shadow: 0 0 18px rgba(255, 215, 67, 0.35);
}

.arcade-lb-row.row-silver .arcade-lb-rank-badge {
    background: linear-gradient(180deg, #eef2f8, #9aa3b2);
    color: #111;
}

.arcade-lb-row.row-bronze .arcade-lb-rank-badge {
    background: linear-gradient(180deg, #e8a86a, #9c5a1a);
    color: #1a0f00;
}

/* ----- Empty state ----- */
.arcade-lb-empty {
    text-align: center;
    padding: 48px 24px 56px;
}

.arcade-lb-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.25));
}

.arcade-lb-empty h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.arcade-lb-empty p {
    margin: 0 auto;
    max-width: 420px;
    color: rgba(238, 244, 255, 0.65);
}

/* ----- Footer ----- */
.arcade-lb-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    font-size: 0.82rem;
}

.arcade-lb-footer a {
    color: rgba(238, 244, 255, 0.58);
    text-decoration: none;
}

.arcade-lb-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.arcade-lb-footer-dot {
    opacity: 0.35;
}

/* ===== Bouncy Keno theme ===== */
.bouncy-lb {
    background:
        radial-gradient(circle at 18% 0%, rgba(80, 220, 130, 0.22), transparent 34%),
        radial-gradient(circle at 88% 100%, rgba(255, 215, 67, 0.12), transparent 32%),
        linear-gradient(180deg, #07111f 0%, #0a1628 45%, #050b14 100%);
}

.bouncy-lb .arcade-lb-storm,
.bouncy-lb .arcade-lb-lightning {
    display: none;
}

.bouncy-lb .arcade-lb-hero-badge {
    background: rgba(80, 220, 130, 0.16);
    border: 1px solid rgba(80, 220, 130, 0.35);
    color: #9dffb8;
}

.bouncy-lb .arcade-lb-title {
    color: #f5fff8;
    text-shadow: 0 0 28px rgba(80, 220, 130, 0.25);
}

.bouncy-lb .arcade-lb-btn-primary {
    background: linear-gradient(180deg, #ffd743 0%, #f0b90b 100%);
    box-shadow: 0 8px 28px rgba(255, 215, 67, 0.28);
}

.bouncy-lb .arcade-lb-board-head {
    background: linear-gradient(180deg, rgba(80, 220, 130, 0.14), rgba(4, 10, 20, 0.2));
    color: #b8ffd0;
}

.bouncy-lb .arcade-lb-podium-slot.rank-1 {
    border-color: rgba(255, 215, 67, 0.35);
    box-shadow: 0 0 24px rgba(255, 215, 67, 0.12);
}

.bouncy-lb .arcade-lb-podium-score,
.bouncy-lb .arcade-lb-score-value {
    color: #ffd743;
}

/* ===== Olympus Keno theme ===== */
.olympus-lb {
    background:
        radial-gradient(circle at 50% -10%, rgba(120, 170, 255, 0.18), transparent 42%),
        radial-gradient(circle at 10% 80%, rgba(88, 56, 180, 0.35), transparent 38%),
        radial-gradient(circle at 92% 70%, rgba(40, 100, 200, 0.22), transparent 36%),
        linear-gradient(180deg, #07091a 0%, #12102e 38%, #0a0e22 100%);
}

.olympus-lb .arcade-lb-storm {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            180deg,
            transparent 0,
            transparent 96px,
            rgba(255, 255, 255, 0.015) 100px
        );
    opacity: 0.5;
}

.olympus-lb .arcade-lb-lightning {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 15%, rgba(180, 220, 255, 0.18), transparent 18%),
        radial-gradient(circle at 78% 28%, rgba(120, 180, 255, 0.12), transparent 16%);
    animation: olympus-sky-pulse 7s ease-in-out infinite;
}

.olympus-lb::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 12%);
    opacity: 0;
    animation: olympus-lightning-flash 9s infinite;
}

.olympus-lb .arcade-lb-hero-badge {
    background: rgba(120, 180, 255, 0.12);
    border: 1px solid rgba(160, 210, 255, 0.35);
    color: #cfe8ff;
    box-shadow: 0 0 20px rgba(120, 180, 255, 0.15);
}

.olympus-lb .arcade-lb-title {
    color: #f8fbff;
    text-shadow:
        0 0 18px rgba(140, 190, 255, 0.45),
        0 0 42px rgba(90, 140, 255, 0.25);
}

.olympus-lb .arcade-lb-tagline {
    color: rgba(210, 228, 255, 0.78);
}

.olympus-lb .arcade-lb-btn-primary {
    background: linear-gradient(180deg, #ffe566 0%, #c9a012 100%);
    color: #1a1200;
    box-shadow:
        0 0 22px rgba(255, 230, 120, 0.35),
        0 10px 28px rgba(0, 0, 0, 0.4);
}

.olympus-lb .arcade-lb-btn-primary:hover {
    box-shadow:
        0 0 30px rgba(255, 230, 120, 0.5),
        0 12px 32px rgba(0, 0, 0, 0.45);
}

.olympus-lb .arcade-lb-board {
    border-color: rgba(140, 190, 255, 0.18);
    box-shadow:
        0 0 0 1px rgba(120, 170, 255, 0.08) inset,
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(80, 140, 255, 0.08);
}

.olympus-lb .arcade-lb-board-head {
    background: linear-gradient(180deg, rgba(70, 110, 200, 0.28), rgba(10, 16, 36, 0.5));
    color: #dceaff;
    text-shadow: 0 0 12px rgba(140, 190, 255, 0.35);
}

.olympus-lb .arcade-lb-podium-slot {
    border-color: rgba(140, 190, 255, 0.14);
}

.olympus-lb .arcade-lb-podium-slot.rank-1 {
    border-color: rgba(255, 230, 120, 0.42);
    box-shadow:
        0 0 28px rgba(120, 180, 255, 0.18),
        0 0 48px rgba(255, 215, 67, 0.12);
}

.olympus-lb .arcade-lb-podium-score,
.olympus-lb .arcade-lb-score-value {
    color: #ffe566;
    text-shadow: 0 0 12px rgba(255, 230, 120, 0.35);
}

.olympus-lb .arcade-lb-empty-icon {
    animation: olympus-bolt-pulse 2.4s ease-in-out infinite;
}

@keyframes olympus-lightning-flash {
    0%, 88%, 100% { opacity: 0; }
    89% { opacity: 0.55; }
    90% { opacity: 0.08; }
    91% { opacity: 0.75; }
    92% { opacity: 0; }
}

@keyframes olympus-sky-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

@keyframes olympus-bolt-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(180, 220, 255, 0.35)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(255, 240, 160, 0.65)); }
}

@media (max-width: 720px) {
    .arcade-lb-podium {
        grid-template-columns: 1fr;
    }

    .arcade-lb-podium-slot.rank-1,
    .arcade-lb-podium-slot.rank-2,
    .arcade-lb-podium-slot.rank-3 {
        order: initial;
        transform: none;
        min-height: 0;
    }

    .arcade-lb-row {
        grid-template-columns: 48px 1fr;
        grid-template-areas:
            "rank player"
            "rank score"
            "rank date";
    }

    .arcade-lb-row-score,
    .arcade-lb-row-date {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .olympus-lb::after,
    .olympus-lb .arcade-lb-lightning,
    .olympus-lb .arcade-lb-empty-icon {
        animation: none;
    }
}
