.content {
    padding-top: 1.5rem;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

body {
    --bs-body-bg: #362D59;
    font-family: "Rubik", sans-serif;
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

.layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.layout > .page {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.layout > .page > main,
.layout > .page > main > .content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.layout > .page > main > .content > .leaderboard {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* =========================================
   Header (banner + overlaid title)
   ========================================= */

header {
    position: relative;
    max-height: 30vh;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

header *::selection {
    background: transparent;
}

header *:focus {
    outline: none;
}

.header-bg {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 30vh;
}

.header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    background: linear-gradient(to top, rgba(54, 45, 89, 1) 0%, rgba(54, 45, 89, 0.85) 50%, transparent 100%);
}

.header-overlay-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

/* =========================================
   Title & Tagline
   ========================================= */

h1 {
    color: white;
    margin-bottom: 0.15rem;
    font-size: 3.5rem;
    text-shadow:
        0 0 10px rgba(200, 50, 150, 0.6),
        0 0 30px rgba(200, 50, 150, 0.3),
        0 0 60px rgba(200, 50, 150, 0.15);
}

h1 span {
    background-color: transparent;
}

.tagline {
    color: #EFB51C;
    font-size: 2rem;
    font-style: italic;
    margin-bottom: 0;
    letter-spacing: 0.05em;
}

p.notice {
    margin-bottom: 2rem;
    font-size: 120%;
}

p.notice span {
    display: inline;
    position: relative;
    overflow: hidden;
    color: black;
}

p.notice span::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 130%;
    top: -15%;
    z-index: -1;
    background-color: #EFB51C;
    transform: rotate(-2deg);
}

/* =========================================
   Leaderboard Container
   ========================================= */

.leaderboard {
    --row-h: 3.5rem;
    background: rgba(30, 22, 54, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(200, 50, 150, 0.25);
    box-shadow:
        0 0 15px rgba(200, 50, 150, 0.1),
        0 0 40px rgba(200, 50, 150, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    overflow-y: auto;
}

/* =========================================
   Table Styling
   ========================================= */

.leaderboard table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    overflow: hidden;
}

.leaderboard thead th {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.5rem 1rem 0.75rem;
    border: none;
    text-align: left;
}

.leaderboard thead th:nth-child(1) {
    text-align: center;
    width: 5%;
}

.leaderboard thead th:nth-child(2) {
    width: 25%;
}

.leaderboard thead th:nth-child(3) {
    width: 18%;
}

.leaderboard thead th:nth-child(4) {
    width: 15%;
}

.leaderboard thead th:nth-child(5) {
    width: 18%;
}

.leaderboard thead th:nth-child(6) {
    width: 19%;
}

.leaderboard tbody tr {
    height: var(--row-h);
    border: none;
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    animation: fadeSlideIn 0.4s ease both;
    animation-delay: calc(var(--i, 0) * 0.06s);
}

.leaderboard tbody tr:nth-child(odd) {
    background-color: rgba(54, 45, 89, 0.6);
}

.leaderboard tbody tr:nth-child(even) {
    background-color: rgba(46, 37, 80, 0.6);
}

.leaderboard tbody tr:hover {
    background-color: rgba(70, 55, 110, 0.8);
    box-shadow: 0 0 12px rgba(200, 50, 150, 0.15);
}

.leaderboard tbody td {
    padding: 0.85rem 1rem;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    vertical-align: middle;
    line-height: 1.6;
}

/* =========================================
   Rank Column
   ========================================= */

.rank-number {
    font-weight: 700;
    font-size: 1.2rem;
    width: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* =========================================
   Podium Rows (Top 3)
   ========================================= */

/* --- 1st Place (Gold) --- */

.rank-gold {
    height: calc(var(--row-h) * 1.5) !important;
    border-left: 4px solid #EFB51C !important;
    background-color: rgba(239, 181, 28, 0.10) !important;
}

.rank-gold .rank-number {
    color: #EFB51C;
    font-size: 2rem;
}

.rank-gold .name-cell {
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem !important;
}

.rank-gold .score-cell {
    font-size: 2.2rem !important;
}

/* --- 2nd Place (Silver) --- */

.rank-silver {
    height: calc(var(--row-h) * 1.3) !important;
    border-left: 4px solid #C0C0C0 !important;
    background-color: rgba(192, 192, 192, 0.06) !important;
}

.rank-silver .rank-number {
    color: #C0C0C0;
    font-size: 1.7rem;
}

.rank-silver .name-cell {
    font-size: 1.5rem !important;
    font-weight: 600;
}

.rank-silver .score-cell {
    font-size: 1.8rem !important;
}

/* --- 3rd Place (Bronze) --- */

.rank-bronze {
    height: calc(var(--row-h) * 1.2) !important;
    border-left: 4px solid #CD7F32 !important;
    background-color: rgba(205, 127, 50, 0.06) !important;
}

.rank-bronze .rank-number {
    color: #CD7F32;
    font-size: 1.5rem;
}

.rank-bronze .name-cell {
    font-size: 1.35rem !important;
    font-weight: 600;
}

.rank-bronze .score-cell {
    font-size: 1.6rem !important;
}

/* =========================================
   Score Column
   ========================================= */

.score-cell {
    font-weight: 700;
    color: #EFB51C !important;
    font-size: 1.3rem !important;
    font-variant-numeric: tabular-nums;
}

/* =========================================
   Name Column
   ========================================= */

.name-cell {
    font-size: 1.15rem;
    font-weight: 500;
}

.crown {
    display: inline-block;
    margin: 0 0.3rem;
    font-size: 1.6rem;
    line-height: 1;
    transform: translateY(-0.15em);
    color: #EFB51C;
}

/* =========================================
   Duration Column
   ========================================= */

.duration-cell {
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 0.05em;
}

/* =========================================
   Muted Secondary Text
   ========================================= */

.text-muted-custom {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 1.1rem !important;
}

/* =========================================
   Stagger-In Animation
   ========================================= */

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   New Score BOMBASTIC Animation
   ========================================= */

/* --- Row: entrance bounce + pulsing glow --- */

.score-new {
    position: relative;
    z-index: 10;
    border-left: 4px solid #EFB51C !important;
    animation:
        rowFlashIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both,
        rowGlowPulse 0.5s ease-in-out 0.4s 6 alternate;
}

@keyframes rowFlashIn {
    0% {
        transform: scaleY(1.15) scaleX(0.98);
        filter: brightness(2.5);
    }
    60% {
        filter: brightness(1.3);
    }
    100% {
        transform: scaleY(1) scaleX(1);
        filter: brightness(1);
    }
}

@keyframes rowGlowPulse {
    0% {
        box-shadow:
            0 0 12px rgba(239, 181, 28, 0.25),
            0 0 30px rgba(239, 181, 28, 0.1),
            inset 0 0 12px rgba(239, 181, 28, 0.08);
    }
    100% {
        box-shadow:
            0 0 25px rgba(239, 181, 28, 0.5),
            0 0 60px rgba(239, 181, 28, 0.2),
            inset 0 0 25px rgba(239, 181, 28, 0.15);
    }
}

/* --- Cells: golden flash that fades out --- */

.score-new > td {
    animation: cellFlash 3s ease-out both;
}

@keyframes cellFlash {
    0% {
        background-color: rgba(255, 255, 255, 0.5);
        text-shadow: 0 0 15px rgba(239, 181, 28, 0.9);
    }
    15% {
        background-color: rgba(239, 181, 28, 0.4);
    }
    40% {
        background-color: rgba(239, 181, 28, 0.15);
    }
    60% {
        text-shadow: 0 0 6px rgba(239, 181, 28, 0.3);
    }
    100% {
        background-color: transparent;
        text-shadow: none;
    }
}

/* --- Anchor: rank cell positions the overlays --- */

.score-new .rank-number {
    position: relative;
    overflow: visible;
}

/* --- Overlay: light beam sweep across entire row --- */

.score-new-beam {
    position: absolute;
    top: -5px;
    bottom: -5px;
    left: -15vw;
    width: 15vw;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(239, 181, 28, 0.1) 15%,
        rgba(255, 255, 255, 0.45) 42%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.45) 58%,
        rgba(239, 181, 28, 0.1) 85%,
        transparent
    );
    animation: beamSweepRow 1s ease-in-out both;
    pointer-events: none;
    z-index: 20;
}

@keyframes beamSweepRow {
    0% {
        left: -15vw;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    85% {
        opacity: 0.6;
    }
    100% {
        left: 95vw;
        opacity: 0;
    }
}

/* --- Overlay: particle spark cluster across entire row --- */

.score-new-sparks {
    position: absolute;
    top: 50%;
    left: -30px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        /* Bright core glow */
        0 0 10px 4px rgba(255, 255, 255, 0.95),
        0 0 20px 8px rgba(239, 181, 28, 0.5),
        0 0 40px 12px rgba(239, 181, 28, 0.15),
        /* Upper scatter */
        -6px -14px 0 1.5px #EFB51C,
        -10px -22px 0 0.5px rgba(239, 181, 28, 0.5),
        5px -18px 0 1.5px #fff,
        12px -10px 0 1px #f08030,
        16px -20px 0 0.5px rgba(255, 255, 255, 0.4),
        -16px -7px 0 1px rgba(255, 255, 255, 0.7),
        9px -26px 0 0.5px rgba(239, 181, 28, 0.3),
        -20px -16px 0 1px #EFB51C,
        /* Lower scatter */
        -5px 16px 0 1.5px #EFB51C,
        7px 21px 0 0.5px rgba(255, 255, 255, 0.5),
        -9px 12px 0 1px #f08030,
        14px 8px 0 1px #EFB51C,
        -4px 24px 0 0.5px rgba(239, 181, 28, 0.3),
        -18px 5px 0 1px #f08030,
        18px 17px 0 0.5px rgba(239, 181, 28, 0.5),
        22px -4px 0 1px rgba(255, 255, 255, 0.6);
    animation: sparkSweepRow 1.1s ease-out both;
    pointer-events: none;
    z-index: 21;
}

@keyframes sparkSweepRow {
    0% {
        left: -30px;
        opacity: 0;
        transform: translateY(-50%) scale(0.2);
    }
    10% {
        opacity: 1;
        transform: translateY(-50%) scale(1.4);
    }
    50% {
        opacity: 0.9;
        transform: translateY(-50%) scale(1);
    }
    100% {
        left: 95vw;
        opacity: 0;
        transform: translateY(-50%) scale(0.3);
    }
}

/* =========================================
   Platform Donut Chart (header overlay)
   ========================================= */

.platform-chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.platform-chart-title {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.platform-chart-overlay {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1.25rem;
    background: rgba(20, 14, 40, 0.7);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 20px rgba(200, 50, 150, 0.15),
        0 0 40px rgba(200, 50, 150, 0.08);
    animation: chartPulse 3s ease-in-out infinite alternate;
}

@keyframes chartPulse {
    0% {
        box-shadow:
            0 0 20px rgba(200, 50, 150, 0.15),
            0 0 40px rgba(200, 50, 150, 0.08);
    }
    100% {
        box-shadow:
            0 0 30px rgba(200, 50, 150, 0.3),
            0 0 60px rgba(200, 50, 150, 0.15);
    }
}

.platform-donut {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: saturate(1.2) brightness(1.1);
    box-shadow:
        0 0 10px 2px rgba(139, 111, 192, 0.4),
        0 0 25px 5px rgba(201, 96, 122, 0.2),
        0 0 40px 8px rgba(76, 175, 154, 0.1);
    animation: donut-glow-pulse 3s ease-in-out infinite;
}

@keyframes donut-glow-pulse {
    0%, 100% {
        box-shadow:
            0 0 10px 2px rgba(139, 111, 192, 0.4),
            0 0 25px 5px rgba(201, 96, 122, 0.2),
            0 0 40px 8px rgba(76, 175, 154, 0.1);
    }
    50% {
        box-shadow:
            0 0 18px 4px rgba(139, 111, 192, 0.6),
            0 0 35px 8px rgba(201, 96, 122, 0.35),
            0 0 55px 14px rgba(76, 175, 154, 0.2);
    }
}

.platform-donut-hole {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1e1636;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-donut-total {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    font-weight: 700;
}

.platform-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.legend-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    flex-shrink: 0;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-logo {
    height: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    object-fit: contain;
    display: block;
}

.legend-logo-xbox {
    width: 2.2rem;
}

.legend-logo-ps {
    width: 2.6rem;
}

.legend-logo-switch {
    width: 2.5rem;
}

.legend-val {
    color: #EFB51C;
    font-weight: 700;
    font-size: 1.3rem;
    margin-left: 0.25rem;
}

/* =========================================
   Platform Badge
   ========================================= */

.platform-cell {
    font-size: 0.95rem !important;
}

.platform-icon {
    display: inline-block;
    vertical-align: middle;
    height: 1.4rem;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    object-fit: contain;
}

.platform-icon-xbox {
    height: 1.3rem;
}

.platform-icon-playstation {
    height: 1.1rem;
}

.platform-icon-switch {
    height: 1.4rem;
}

/* =========================================
   Skeleton Platform
   ========================================= */

.skeleton-platform {
    width: 5rem;
}

/* =========================================
   Pagination
   ========================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.75rem 0 0.25rem;
    flex-shrink: 0;
}

.page-btn {
    background: rgba(200, 50, 150, 0.15);
    border: 1px solid rgba(200, 50, 150, 0.35);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-family: "Rubik", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: rgba(200, 50, 150, 0.3);
    border-color: rgba(200, 50, 150, 0.6);
    box-shadow: 0 0 10px rgba(200, 50, 150, 0.2);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.page-info {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

/* =========================================
   Skeleton Loader
   ========================================= */

.skeleton-row td {
    padding: 0.85rem 1rem;
    border: none;
}

.skeleton-block {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    height: 1.2rem;
}

.skeleton-rank {
    width: 2rem;
}

.skeleton-name {
    width: 70%;
    min-width: 8rem;
}

.skeleton-score {
    width: 4rem;
}

.skeleton-time {
    width: 3.5rem;
}

.skeleton-recorded {
    width: 8rem;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* =========================================
   Floating Particles
   ========================================= */

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: float linear infinite;
}

/* Bottom starters */
.particle:nth-child(1) {
    width: 6px;
    height: 6px;
    background: #e05050;
    left: 5%;
    bottom: -10px;
    animation-duration: 8s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 5px;
    height: 5px;
    background: #f08030;
    left: 15%;
    bottom: -10px;
    animation-duration: 10s;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    width: 7px;
    height: 7px;
    background: #e04040;
    left: 55%;
    bottom: -10px;
    animation-duration: 9s;
    animation-delay: 0.5s;
}

.particle:nth-child(4) {
    width: 5px;
    height: 5px;
    background: #f06020;
    left: 85%;
    bottom: -10px;
    animation-duration: 11s;
    animation-delay: 2s;
}

.particle:nth-child(5) {
    width: 6px;
    height: 6px;
    background: #e05050;
    left: 35%;
    bottom: -10px;
    animation-duration: 8s;
    animation-delay: 4s;
}

/* Upper starters (near top of leaderboard, short travel) */
.particle:nth-child(6) {
    width: 7px;
    height: 7px;
    background: #e04040;
    left: 8%;
    bottom: 65%;
    animation: float-short 12s linear infinite;
    animation-delay: 3.5s;
}

.particle:nth-child(7) {
    width: 5px;
    height: 5px;
    background: #f06020;
    left: 25%;
    bottom: 60%;
    animation: float-short 10s linear infinite;
    animation-delay: 0.8s;
}

.particle:nth-child(8) {
    width: 6px;
    height: 6px;
    background: #e05050;
    left: 45%;
    bottom: 70%;
    animation: float-short 14s linear infinite;
    animation-delay: 2s;
}

.particle:nth-child(9) {
    width: 4px;
    height: 4px;
    background: #f08030;
    left: 70%;
    bottom: 60%;
    animation: float-short 11s linear infinite;
    animation-delay: 5s;
}

.particle:nth-child(10) {
    width: 7px;
    height: 7px;
    background: #e04040;
    left: 90%;
    bottom: 65%;
    animation: float-short 13s linear infinite;
    animation-delay: 1.2s;
}

.particle:nth-child(11) {
    width: 5px;
    height: 5px;
    background: #f06020;
    left: 50%;
    bottom: 55%;
    animation: float-short 12s linear infinite;
    animation-delay: 6s;
}

.particle:nth-child(12) {
    width: 6px;
    height: 6px;
    background: #d05030;
    left: 35%;
    bottom: 40%;
    animation: float 14s linear infinite;
    animation-delay: 3.5s;
}

.particle:nth-child(13) {
    width: 4px;
    height: 4px;
    background: #c04828;
    left: 75%;
    bottom: 70%;
    animation: float-short 11s linear infinite;
    animation-delay: 8s;
}

@keyframes float {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh);
        opacity: 0;
    }
}

@keyframes float-short {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-40vh);
        opacity: 0;
    }
}

/* =========================================
   Footer
   ========================================= */

footer {
    position: relative;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem;
    flex-shrink: 0;
}

footer .pagination {
    margin: 0;
    padding: 0.5rem 0;
}

footer .footer-brand {
    position: absolute;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

footer .footer-text {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

footer img {
    width: 36px;
}

/* =========================================
   Off-Screen New Score Toast
   ========================================= */

.offscreen-toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.offscreen-toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(30, 22, 54, 0.95);
    border: 1px solid rgba(239, 181, 28, 0.5);
    border-left: 4px solid #EFB51C;
    border-radius: 8px;
    box-shadow:
        0 0 20px rgba(239, 181, 28, 0.3),
        0 0 50px rgba(239, 181, 28, 0.1);
    animation: toastSlideUp 4s ease both;
    white-space: nowrap;
}

.offscreen-toast-rank {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 2.5rem;
}

.offscreen-toast-name {
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
}

.offscreen-toast-score {
    color: #EFB51C;
    font-weight: 700;
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
}

@keyframes toastSlideUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    8% {
        transform: translateY(0);
        opacity: 1;
    }
    12% {
        box-shadow:
            0 0 30px rgba(239, 181, 28, 0.5),
            0 0 60px rgba(239, 181, 28, 0.2);
    }
    70% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(30%);
        opacity: 0;
    }
}

/* =========================================
   Latest View — column widths & scroll
   ========================================= */

.latest-view {
    overflow-y: auto;
}

.latest-view thead th:nth-child(1) {
    text-align: left;
    width: 25%;
}

.latest-view thead th:nth-child(2) {
    width: 20%;
}

.latest-view thead th:nth-child(3) {
    width: 15%;
}

.latest-view thead th:nth-child(4) {
    width: 15%;
}

.latest-view thead th:nth-child(5) {
    width: 25%;
}

/* =========================================
   Mobile Responsive
   ========================================= */

@media (max-width: 768px) {
    /* --- Header --- */
    h1 {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .header-overlay {
        padding: 0.5rem 1rem;
    }

    .header-overlay-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Hide platform chart on small screens */
    .platform-chart-wrapper {
        display: none;
    }

    /* --- Leaderboard --- */
    .leaderboard {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .leaderboard thead th {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
        letter-spacing: 0.06em;
    }

    .leaderboard tbody td {
        padding: 0.5rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Hide Time and Recorded columns on mobile */
    .leaderboard thead th:nth-child(4),
    .leaderboard tbody td:nth-child(4),
    .leaderboard thead th:nth-child(6),
    .leaderboard tbody td:nth-child(6) {
        display: none;
    }

    /* Adjust column widths for mobile (Rank, Name, Score, Platform visible) */
    .leaderboard thead th:nth-child(1) { width: 10%; }
    .leaderboard thead th:nth-child(2) { width: 40%; }
    .leaderboard thead th:nth-child(3) { width: 25%; }
    .leaderboard thead th:nth-child(5) { width: 25%; }

    /* Podium scaling */
    .rank-gold .name-cell { font-size: 1.2rem !important; }
    .rank-gold .score-cell { font-size: 1.5rem !important; }
    .rank-gold .rank-number { font-size: 1.4rem; }

    .rank-silver .name-cell { font-size: 1.1rem !important; }
    .rank-silver .score-cell { font-size: 1.3rem !important; }
    .rank-silver .rank-number { font-size: 1.2rem; }

    .rank-bronze .name-cell { font-size: 1rem !important; }
    .rank-bronze .score-cell { font-size: 1.2rem !important; }
    .rank-bronze .rank-number { font-size: 1.1rem; }

    .score-cell { font-size: 1rem !important; }
    .name-cell { font-size: 0.95rem; }
    .rank-number { font-size: 1rem; width: 2rem; }

    /* --- Latest view: hide Time and Platform columns --- */
    .latest-view thead th:nth-child(3),
    .latest-view tbody td:nth-child(3),
    .latest-view thead th:nth-child(4),
    .latest-view tbody td:nth-child(4) {
        display: none;
    }

    .latest-view thead th:nth-child(1) { width: 35%; }
    .latest-view thead th:nth-child(2) { width: 30%; }
    .latest-view thead th:nth-child(5) { width: 35%; }

    /* --- Footer --- */
    footer {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    footer .footer-brand {
        position: static;
    }

    /* --- Pagination --- */
    .pagination {
        gap: 0.75rem;
    }

    .page-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    /* --- Toast --- */
    .offscreen-toast {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .offscreen-toast-name { font-size: 1rem; }
    .offscreen-toast-score { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }

    .tagline {
        font-size: 1rem;
    }

    header {
        max-height: 20vh;
    }

    .header-bg {
        max-height: 20vh;
    }

    /* Also hide Platform column on very small screens */
    .leaderboard thead th:nth-child(5),
    .leaderboard tbody td:nth-child(5) {
        display: none;
    }

    .leaderboard thead th:nth-child(2) { width: 50%; }
    .leaderboard thead th:nth-child(3) { width: 40%; }

    /* Latest view: show only Name, Score, Recorded */
    .latest-view thead th:nth-child(1) { width: 40%; }
    .latest-view thead th:nth-child(2) { width: 30%; }
    .latest-view thead th:nth-child(5) { width: 30%; }

    .crown {
        font-size: 1.1rem;
    }
}
