@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }

}

@keyframes pulse {
    0%,
100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.4;
    }

}

/* Fade-in row animation */
@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }

}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #020817;
    color: white;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* -- Background -- */
.lb-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(99,60,220,0.35) 0%, transparent 70%),
                radial-gradient(ellipse 80% 60% at 80% 100%, rgba(16,185,129,0.15) 0%, transparent 60%),
                #020817;
}

.lb-grid-lines {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.lb-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.lb-particle {
    position: absolute;
    border-radius: 50%;
    animation: floatUp linear infinite;
    opacity: 0;
}

/* -- Layout -- */
.lb-root {
    position: relative;
    z-index: 1;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* -- Header -- */
.lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(2,8,23,0.6);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.lb-header-logo {
    height: 36px;
    object-fit: contain;
}

.lb-header-center {
    text-align: center;
    flex: 1;
}

.lb-header-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 30%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.lb-header-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 2px;
}

.lb-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 200px;
}

/* Status badge */
.lb-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.status-live {
    background: rgba(16,185,129,0.15);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.3);
    box-shadow: 0 0 12px rgba(16,185,129,0.2);
}

.status-live .lb-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 1.4s ease-in-out infinite;
}

.status-waiting {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
}

.status-ended {
    background: rgba(100,116,139,0.15);
    color: #94a3b8;
    border: 1px solid rgba(100,116,139,0.3);
}

/* Countdown */
.lb-countdown {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #a78bfa;
}

.lb-countdown-label {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 1px;
    text-align: right;
}

/* -- Join Competition CTA -- */
.lb-join-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 40px;
    background: linear-gradient(90deg, rgba(124,58,237,0.18), rgba(167,139,250,0.10));
    border-bottom: 1px solid rgba(167,139,250,0.25);
    flex-shrink: 0;
}

.lb-join-cta-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.lb-join-cta-text i {
    color: #a78bfa;
    font-size: 16px;
}

.lb-join-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    border-radius: 8px;
    background: linear-gradient(180deg, #8A2BE2 0%, #6B0CC3 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(138,43,226,0.35);
    transition: opacity 0.2s, transform 0.2s;
}

.lb-join-cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* -- Stats Bar -- */
.lb-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 12px 40px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.lb-stat {
    text-align: center;
}

.lb-stat-val {
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 1px;
}

.lb-stat-lbl {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.lb-stat-divider {
    width: 1px;
    height: 34px;
    background: rgba(255,255,255,0.08);
}

/* Entry type tabs */
.lb-entry-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 40px;
    background: rgba(2,8,23,0.45);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.lb-entry-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 150px;
    padding: 9px 18px;
    border: 1px solid rgba(167,139,250,0.25);
    border-radius: 8px;
    background: rgba(124,58,237,0.08);
    color: rgba(226,232,240,0.65);
    font: 700 13px 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.lb-entry-tab:hover {
    color: #ffffff;
    border-color: rgba(167,139,250,0.55);
}

.lb-entry-tab.active {
    color: #ffffff;
    border-color: #8b5cf6;
    background: linear-gradient(180deg, rgba(139,92,246,0.34), rgba(109,40,217,0.24));
    box-shadow: 0 0 18px rgba(124,58,237,0.18);
}

.lb-entry-tab-count {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255,255,255,0.09);
    color: #c4b5fd;
    font-size: 11px;
    line-height: 16px;
}

/* -- Table Area -- */
.lb-table-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 40px 20px;
}

.lb-table-wrap::-webkit-scrollbar {
    width: 4px;
}

.lb-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.lb-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(167,139,250,0.3);
    border-radius: 2px;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.lb-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

.lb-table thead tr {
    background: rgba(2,8,23,0.9);
    backdrop-filter: blur(8px);
}

.lb-table thead th {
    padding: 14px 16px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lb-table thead th:first-child {
    width: 80px;
    text-align: center;
}

.lb-table thead th:nth-child(2) {
    text-align: left;
}

.lb-table thead th:nth-child(3) {
    text-align: center;
    width: 200px;
}

.lb-table thead th:nth-child(4),
.lb-table thead th:nth-child(5) {
    text-align: right;
    width: 180px;
}

.lb-table thead th:nth-child(6),
.lb-table thead th:nth-child(7) {
    text-align: right;
    width: 200px;
}

.lb-table thead th:nth-child(8) {
    text-align: center;
    width: 200px;
}

.lb-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}

.lb-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Top 3 row highlights */
.row-rank-1 {
    background: linear-gradient(90deg, rgba(252,211,77,0.07) 0%, transparent 80%) !important;
}

.row-rank-2 {
    background: linear-gradient(90deg, rgba(203,213,225,0.05) 0%, transparent 80%) !important;
}

.row-rank-3 {
    background: linear-gradient(90deg, rgba(253,186,116,0.05) 0%, transparent 80%) !important;
}

.lb-table tbody td {
    padding: 10px 16px;
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    vertical-align: middle;
}

.lb-table tbody td:first-child {
    text-align: center;
}

.lb-table tbody td:nth-child(3) {
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lb-table tbody td:nth-child(4),
.lb-table tbody td:nth-child(5),
.lb-table tbody td:nth-child(6),
.lb-table tbody td:nth-child(7) {
    text-align: right;
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lb-table tbody td:nth-child(8) {
    text-align: center;
}

.lb-prize-cell {
    color: #fcd34d;
    font-size: 13px;
    font-weight: 600;
}

.lb-prize-content {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.lb-table .lb-prize-cell .lb-bonus-prize {
    margin-top: 6px;
    color: #c4b5fd;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: normal;
    white-space: normal;
}

/* Rank badge */
.lb-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.rb-1 {
    background: rgba(252,211,77,0.15);
    color: #fcd34d;
    border: 1px solid rgba(252,211,77,0.5);
    box-shadow: 0 0 10px rgba(252,211,77,0.2);
}

.rb-2 {
    background: rgba(203,213,225,0.12);
    color: #cbd5e1;
    border: 1px solid rgba(203,213,225,0.4);
}

.rb-3 {
    background: rgba(253,186,116,0.12);
    color: #fdba74;
    border: 1px solid rgba(253,186,116,0.4);
}

.rb-n {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Rank trophy icons for top 3 */
.lb-trophy {
    font-size: 18px;
}

/* Name cell */
.lb-name-primary {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
}

.lb-name-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(167,139,250,0.15);
    color: #a78bfa;
    font-weight: 700;
    letter-spacing: 1px;
    vertical-align: middle;
}

/* PnL colors */
.pnl-pos {
    color: #10b981;
}

.pnl-neg {
    color: #f87171;
}

.pnl-neu {
    color: rgba(255,255,255,0.35);
}

/* -- Empty / Loading -- */
.lb-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255,255,255,0.3);
}

.lb-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* -- Footer bar -- */
.lb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(2,8,23,0.6);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.lb-footer-note {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    letter-spacing: 1px;
}

.lb-footer-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.25);
}

.lb-refresh-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

/* -- Rank change indicators -- */
.rank-change {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    margin-left: 7px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    vertical-align: middle;
    line-height: 1;
}

.rank-up {
    color: #10b981;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    box-shadow: 0 0 6px rgba(16,185,129,0.08);
    animation: rankFadeIn 0.4s ease-out forwards;
}

.rank-down {
    color: #f87171;
    background: rgba(248,113,113,0.08);
    border: 1px solid rgba(248,113,113,0.2);
    box-shadow: 0 0 6px rgba(248,113,113,0.08);
    animation: rankFadeIn 0.4s ease-out forwards;
}

.rank-change svg {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* -- PnL change indicators -- */
.pnl-change {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    margin-left: 8px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    vertical-align: middle;
    line-height: 1;
}

.pnl-up {
    color: #10b981;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.18);
    box-shadow: 0 0 8px rgba(16,185,129,0.1);
    animation: pnlSlideIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}

.pnl-down {
    color: #f87171;
    background: rgba(248,113,113,0.08);
    border: 1px solid rgba(248,113,113,0.18);
    box-shadow: 0 0 8px rgba(248,113,113,0.1);
    animation: pnlSlideIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}

.pnl-change svg {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes pnlSlideIn {
    0% {
        opacity: 0;
        transform: translateY(4px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

@keyframes rankFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }

}

.lb-row-anim {
    animation: fadeInRow 0.35s ease forwards;
}

/* Top glow line */
.lb-top-glow {
    height: 2px;
    background: linear-gradient(90deg, transparent, #7c3aed, #10b981, transparent);
    flex-shrink: 0;
}

/* -- Mobile leaderboard -- */
@media (max-width: 900px) {
    .lb-page-html {
        min-height: 100%;
        background: #020817;
    }

    body.lb-page {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .lb-page .lb-root {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
    }

    .lb-page .lb-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo status"
            "title title";
        gap: 14px 16px;
        padding: 16px 18px;
    }

    .lb-page .lb-header-logo {
        grid-area: logo;
        width: min(34vw, 140px);
        max-width: 100%;
        height: 32px;
        justify-self: start;
    }

    .lb-page .lb-header-center {
        grid-area: title;
        min-width: 0;
        text-align: left;
    }

    .lb-page .lb-header-title {
        font-size: 24px;
        line-height: 1.15;
        letter-spacing: 1.25px;
        overflow-wrap: anywhere;
    }

    .lb-page .lb-header-sub {
        margin-top: 5px;
        font-size: 10px;
        line-height: 1.4;
        letter-spacing: 1.7px;
    }

    .lb-page .lb-header-right {
        grid-area: status;
        min-width: 0;
        gap: 2px;
        align-self: start;
    }

    .lb-page .lb-status {
        padding: 4px 10px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .lb-page .lb-countdown {
        font-size: 18px;
        letter-spacing: 1.5px;
    }

    .lb-page .lb-countdown-label {
        font-size: 9px;
    }

    .lb-page .lb-join-cta {
        align-items: stretch;
        gap: 12px;
        padding: 14px 18px;
    }

    .lb-page .lb-join-cta-text {
        width: 100%;
        align-items: flex-start;
        font-size: 13px;
        line-height: 1.5;
    }

    .lb-page .lb-join-cta-btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        padding: 10px 18px;
    }

    .lb-page .lb-stats-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        padding: 0 18px;
    }

    .lb-page .lb-stat {
        min-width: 0;
        padding: 13px 8px;
    }

    .lb-page .lb-stat:nth-child(1),
.lb-page .lb-stat:nth-child(3) {
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .lb-page .lb-stat:nth-child(1),
.lb-page .lb-stat:nth-child(5) {
        border-right: 1px solid rgba(255,255,255,0.06);
    }

    .lb-page .lb-stat-val {
        font-size: 19px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .lb-page .lb-stat-lbl {
        margin-top: 2px;
        font-size: 9px;
        line-height: 1.35;
        letter-spacing: 1px;
    }

    .lb-page .lb-stat-divider {
        display: none;
    }

    .lb-page .lb-entry-tabs {
        gap: 8px;
        padding: 12px 14px;
    }

    .lb-page .lb-entry-tab {
        min-width: 0;
        flex: 1;
        min-height: 42px;
        padding: 9px 10px;
    }

    .lb-page .lb-table-wrap {
        flex: none;
        overflow: visible;
        padding: 16px 14px 20px;
    }

    .lb-page .lb-table,
.lb-page .lb-table tbody {
        display: block;
        width: 100%;
    }

    .lb-page .lb-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .lb-page .lb-table tbody tr {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        column-gap: 12px;
        width: 100%;
        margin-bottom: 12px;
        padding: 14px;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 12px;
        background: rgba(15,23,42,0.72);
        box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    }

    .lb-page .lb-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .lb-page .lb-table tbody tr:hover {
        background: rgba(15,23,42,0.72);
    }

    .lb-page .lb-table tbody .row-rank-1 {
        background: linear-gradient(135deg, rgba(252,211,77,0.10), rgba(15,23,42,0.82) 48%) !important;
    }

    .lb-page .lb-table tbody .row-rank-2 {
        background: linear-gradient(135deg, rgba(203,213,225,0.08), rgba(15,23,42,0.82) 48%) !important;
    }

    .lb-page .lb-table tbody .row-rank-3 {
        background: linear-gradient(135deg, rgba(253,186,116,0.08), rgba(15,23,42,0.82) 48%) !important;
    }

    .lb-page .lb-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        grid-column: 1 / -1;
        min-width: 0;
        padding: 9px 0;
        border-top: 1px solid rgba(255,255,255,0.05);
        text-align: right;
        font-size: 14px;
        line-height: 1.35;
    }

    .lb-page .lb-table tbody td::before {
        flex: 0 0 auto;
        color: rgba(255,255,255,0.38);
        font-family: 'Inter', sans-serif;
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 1px;
        line-height: 1.3;
        text-align: left;
        text-transform: uppercase;
    }

    .lb-page .lb-table tbody td:first-child {
        grid-column: 1;
        grid-row: 1 / span 2;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 0;
        border-top: 0;
        text-align: center;
    }

    .lb-page .lb-table tbody td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-start;
        padding: 1px 0 5px;
        border-top: 0;
        text-align: left;
    }

    .lb-page .lb-table tbody td:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-start;
        gap: 7px;
        padding: 4px 0 9px;
        border-top: 0;
        text-align: left;
        font-family: 'Inter', sans-serif;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0;
    }

    .lb-page .lb-table tbody td:nth-child(3)::before {
        content: "Squad";
    }

    .lb-page .lb-table tbody td:nth-child(4)::before {
        content: "Profit target";
    }

    .lb-page .lb-table tbody td:nth-child(5)::before {
        content: "Realised PnL";
    }

    .lb-page .lb-table tbody td:nth-child(6)::before {
        content: "Unrealised PnL";
    }

    .lb-page .lb-table tbody td:nth-child(7)::before {
        content: "Total PnL";
    }

    .lb-page .lb-table tbody td:nth-child(8)::before {
        content: "Prize";
    }

    .lb-page .lb-table tbody td:nth-child(4),
.lb-page .lb-table tbody td:nth-child(5),
.lb-page .lb-table tbody td:nth-child(6),
.lb-page .lb-table tbody td:nth-child(7) {
        text-align: right;
        font-size: 15px;
    }

    .lb-page .lb-table tbody td:nth-child(8) {
        text-align: right;
    }

    .lb-page .lb-name-primary {
        max-width: 100%;
        font-size: 15px;
        overflow-wrap: anywhere;
    }

    .lb-page .lb-name-badge {
        margin-left: 5px;
    }

    .lb-page .lb-squad-pill {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .lb-page .rank-change,
.lb-page .pnl-change {
        margin-left: 4px;
    }

    .lb-page .lb-table tbody tr.lb-empty-row {
        display: block;
        padding: 0;
    }

    .lb-page .lb-table tbody tr.lb-empty-row td {
        display: block;
        padding: 0;
        border: 0;
        text-align: center;
    }

    .lb-page .lb-table tbody tr.lb-empty-row td::before {
        display: none;
    }

    .lb-page .lb-empty {
        padding: 52px 18px;
        line-height: 1.5;
    }

    .lb-page .lb-empty i {
        font-size: 40px;
    }

    .lb-page .lb-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
    }

    .lb-page .lb-footer-note {
        line-height: 1.5;
        letter-spacing: 0.5px;
    }

    .lb-page .lb-footer-refresh {
        flex-wrap: wrap;
    }

}

@media (max-width: 420px) {
    .lb-page .lb-header {
        gap: 12px;
        padding: 14px;
    }

    .lb-page .lb-header-title {
        font-size: 21px;
    }

    .lb-page .lb-header-sub {
        letter-spacing: 1.2px;
    }

    .lb-page .lb-status {
        padding-inline: 8px;
        font-size: 9px;
    }

    .lb-page .lb-countdown {
        font-size: 16px;
    }

    .lb-page .lb-stats-bar {
        padding-inline: 14px;
    }

    .lb-page .lb-stat-val {
        font-size: 17px;
    }

    .lb-page .lb-table-wrap {
        padding-inline: 10px;
    }

    .lb-page .lb-table tbody tr {
        grid-template-columns: 52px minmax(0, 1fr);
        column-gap: 10px;
        padding: 12px;
    }

}

/*****************************************************************************************/
/* Competition Register FrontDesk */
/*****************************************************************************************/
input,
textarea,
select,
button {
    background: transparent;
}

/* Card */
.fdOuterArea {
    z-index: 9;
    display: flex;
    flex-direction: column;
    padding: 5px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #333;
    background: linear-gradient(120.14deg, rgba(255,255,255,0.06) 17.99%, rgba(138,43,226,0.06) 84.93%);
    max-width: 600px;
    width: 100%;
    align-self: center;
    margin: 0 auto;
}

.fdInnerArea {
    padding: 20px 16px;
}

/* Header */
.fdTitle {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    margin-bottom: 4px;
}

.fdSubtitle {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 22px;
}

/* Competition info card */
.fdInfoCard {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.fdInfoRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 13px;
}

.fdInfoRow:last-child {
    border-bottom: none;
}

.fdInfoLabel {
    color: #888;
}

.fdInfoValue {
    font-weight: bold;
    color: white;
}

/* Front desk badge */
.fdBadge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(138,43,226,0.18);
    border: 1px solid rgba(138,43,226,0.45);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    color: #c084fc;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Input */
.fdInputArea {
    margin-bottom: 20px;
}

.fdInputCaption {
    padding-bottom: 6px;
    font-size: 12px;
    line-height: 13px;
    padding-left: 3px;
    color: #ccc;
}

.fdInputDataArea {
    display: flex;
    border-radius: 6px;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    align-items: center;
}

.fdInputDataArea i {
    font-size: 16px;
    color: #888;
    padding: 10px 12px;
}

.fdInputData {
    flex: 1;
    padding: 11px 14px;
    font-size: 14px;
    color: black;
    line-height: 23px;
    outline: none;
    border: none;
    box-sizing: border-box;
    width: 100%;
}

/* Button */
.fdButton {
    width: 100%;
    text-align: center;
    margin-top: 6px;
    font-size: 16px;
    border-radius: 8px;
    line-height: 24px;
    background: linear-gradient(180deg, #8A2BE2 0%, #6B0CC3 100%);
    opacity: 0.92;
    cursor: pointer;
    color: white;
    border: none;
    padding: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

.fdButton:hover {
    opacity: 1;
}

.fdButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Invalid area */
.fdInvalidArea {
    text-align: center;
    padding: 50px 20px;
    color: white;
}

.fdInvalidArea i {
    font-size: 50px;
    color: #ff6b6b;
    margin-bottom: 15px;
    display: block;
}

/* Loading overlay */
#fdLoadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#fdLoadingOverlay.show,
#fdLoadingOverlay[style*="display: flex"] {
    display: flex !important;
}

.fdSpinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255,255,255,0.15);
    border-top-color: #8A2BE2;
    border-radius: 50%;
    animation: fdSpin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes fdSpin {
    to {
        transform: rotate(360deg);
    }

}

.fdLoadingText {
    color: #ddd;
    font-size: 14px;
    font-weight: 500;
}



