/* The Lounge — matches homepage / profile glass theme */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body.lounge-page-body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #050505;
    color: #f5f5f5;
    padding: 0;
    min-height: 100vh;
    overflow-x: clip;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.lounge-page-body .lounge-page {
    position: relative;
    max-width: min(1100px, 100%);
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 32px) clamp(40px, 5vw, 56px);
}

body.lounge-page-body #headerContainer {
    width: 100%;
}

.lounge-hero {
    position: relative;
    z-index: 1;
    margin: 0 0 clamp(24px, 3.5vw, 32px);
    padding: clamp(28px, 5vw, 44px) 0 clamp(24px, 4vw, 32px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lounge-hero-title,
.lounge-hero-lead {
    position: relative;
    z-index: 1;
}

.lounge-hero-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.1;
}

.lounge-hero-lead {
    margin: 0;
    max-width: 42rem;
    font-size: clamp(15px, 2.2vw, 17px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.52);
}

.lounge-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2.5vw, 22px);
}

.lounge-testers-deprecation {
    margin: 0 0 clamp(18px, 2.5vw, 22px);
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.14);
}

.lounge-testers-deprecation p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 248, 235, 0.95);
}

.lounge-board-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lounge-board-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.lounge-board-tab:hover {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.04);
}

.lounge-board-tab.is-active {
    color: #fff;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.22), rgba(79, 70, 229, 0.1));
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lounge-board-tab:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.lounge-board-tab-label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.lounge-board-tab-desc {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.42);
}

.lounge-board-tab.is-active .lounge-board-tab-desc {
    color: rgba(199, 210, 254, 0.75);
}

.lounge-sub-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 14px;
}

.lounge-sub-nav--metric {
    margin-bottom: 20px;
}

.lounge-sub-nav-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    margin-right: 4px;
}

.lounge-sub-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.lounge-sub-pill:hover {
    color: #fff;
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(99, 102, 241, 0.1);
}

.lounge-sub-pill.is-active {
    color: #e0e7ff;
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(99, 102, 241, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lounge-sub-pill:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.lounge-board-panels {
    min-width: 0;
}

.lounge-board-panel {
    display: none;
}

.lounge-board-panel.is-active {
    display: block;
}

.lounge-board-panel.lounge-glass-section {
    margin-bottom: 0;
}

.lounge-load-more-wrap {
    margin-top: 18px;
    text-align: center;
}

.lounge-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 10rem;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.45);
    background: rgba(99, 102, 241, 0.14);
    color: #e0e7ff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease;
}

.lounge-load-more-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.24);
    border-color: rgba(165, 180, 252, 0.65);
}

.lounge-load-more-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.lounge-score-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.16);
    border: 1px solid rgba(129, 140, 248, 0.35);
    color: #e0e7ff;
    font-variant-numeric: tabular-nums;
}

.lounge-glass-section {
    margin-bottom: clamp(20px, 3vw, 28px);
    padding: clamp(20px, 3vw, 28px);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.lounge-glass-section:last-of-type {
    margin-bottom: 0;
}

.lounge-section-title {
    margin: 0 0 12px;
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lounge-section-intro {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
    max-width: 52rem;
}

.lounge-section-intro a,
.lounge-inline-link {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 600;
}

.lounge-section-intro a:hover,
.lounge-inline-link:hover {
    color: #c7d2fe;
    text-decoration: underline;
}

.lounge-loading-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px 16px;
    min-height: 56px;
}

.lounge-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: lounge-loading-spin 0.75s linear infinite;
}

@keyframes lounge-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.lounge-empty {
    color: rgba(255, 255, 255, 0.45);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

.lounge-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

body.lounge-page-body table.leader {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: inherit;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

body.lounge-page-body table.leader th,
body.lounge-page-body table.leader td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

body.lounge-page-body table.leader tbody tr:last-child td {
    border-bottom: none;
}

body.lounge-page-body table.leader th {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
}

body.lounge-page-body table.leader tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

body.lounge-page-body table.leader a {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 600;
}

body.lounge-page-body table.leader a:hover {
    text-decoration: underline;
    color: #c7d2fe;
}

body.lounge-page-body table.leader .lb-rank-cell {
    width: 5rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

body.lounge-page-body table.leader .lb-medal {
    font-size: 1.25em;
    line-height: 1;
    margin-right: 4px;
    vertical-align: -0.1em;
}

body.lounge-page-body table.leader tr.lb-rank-1 td {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.14), rgba(35, 30, 10, 0.75));
    box-shadow: inset 4px 0 0 #f0c830;
}

body.lounge-page-body table.leader tr.lb-rank-2 td {
    background: linear-gradient(90deg, rgba(210, 218, 230, 0.1), rgba(22, 24, 30, 0.8));
    box-shadow: inset 4px 0 0 #b8c4d8;
}

body.lounge-page-body table.leader tr.lb-rank-3 td {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.12), rgba(32, 22, 14, 0.8));
    box-shadow: inset 4px 0 0 #c67f3a;
}

.lounge-status-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: 0.15em;
    background: rgba(52, 211, 153, 0.14);
    color: #86efac;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.lounge-page-footer {
    margin-top: clamp(32px, 4vw, 48px);
    padding: 20px 0 8px;
    text-align: center;
    color: rgba(255, 255, 255, 0.38);
    font-size: 13px;
    line-height: 1.65;
}

.lounge-page-footer a {
    color: #a5b4fc;
    text-decoration: none;
}

.lounge-page-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 820px) {
    .lounge-board-nav {
        grid-template-columns: 1fr;
    }

    .lounge-board-tab {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .lounge-board-tab-desc {
        text-align: right;
    }
}

@media (max-width: 640px) {
    .lounge-mobile-cards.lounge-table-wrap {
        overflow-x: visible;
    }

    .lounge-mobile-cards table.leader {
        border: none;
        background: transparent;
    }

    .lounge-mobile-cards table.leader thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .lounge-mobile-cards table.leader tbody {
        display: block;
    }

    .lounge-mobile-cards table.leader tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 14px;
        background: rgba(255, 255, 255, 0.04);
        overflow: hidden;
    }

    .lounge-mobile-cards table.leader tbody tr:last-child {
        margin-bottom: 0;
    }

    .lounge-mobile-cards table.leader tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        text-align: right;
        background: transparent !important;
        box-shadow: none !important;
    }

    .lounge-mobile-cards table.leader tbody td:last-child {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .lounge-mobile-cards table.leader tbody td::before {
        content: attr(data-label);
        color: rgba(255, 255, 255, 0.45);
        font-weight: 700;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        text-align: left;
        flex-shrink: 0;
        max-width: 42%;
        line-height: 1.35;
        padding-top: 2px;
    }

    .lounge-mobile-cards table.leader tbody tr.lb-rank-1 {
        box-shadow: inset 4px 0 0 #f0c830;
        background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), rgba(35, 30, 10, 0.65)) !important;
    }

    .lounge-mobile-cards table.leader tbody tr.lb-rank-2 {
        box-shadow: inset 4px 0 0 #b8c4d8;
        background: linear-gradient(90deg, rgba(210, 218, 230, 0.08), rgba(22, 24, 30, 0.7)) !important;
    }

    .lounge-mobile-cards table.leader tbody tr.lb-rank-3 {
        box-shadow: inset 4px 0 0 #c67f3a;
        background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), rgba(32, 22, 14, 0.7)) !important;
    }
}
