/* style.css */
:root {
    --bg: #0b0f17;
    --card: #111827;
    --muted: #6b7280;
    --text: #e5e7eb;
    --accent: #60a5fa;
    --accent-2: #22d3ee;
    --border: #1f2937;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
    background: linear-gradient(120deg, #0b0f17, #0a1220 35%, #0b0f17 70%), var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.wrap {
    width: min(1100px, 100%);
}

/* Tabs with logos */
.tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 14px 0;
    padding: 6px;
    background: rgba(17, 24, 39, .6);
    border: 1px solid var(--border);
    border-radius: 14px;
    position: sticky;
    top: 16px;
    backdrop-filter: blur(8px);
}

.tab {
    appearance: none;
    border: none;
    background: #0e1726;
    color: #d1d5db;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform .04s ease, border-color .2s;
    display: flex;
    align-items: center;
    gap: 8px
}

.tab:hover {
    border-color: #2b3546
}

.tab:active {
    transform: translateY(1px)
}

.tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0b1020;
    font-weight: 700
}

.tab-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .15);
    background: #0b0f17
}

.card {
    background: rgba(17, 24, 39, .85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35)
}

header {
    padding: 22px 22px 8px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.title {
    display: flex;
    align-items: center;
    gap: 12px
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: grid;
    place-items: center
}


/* Table */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    padding: 0 12px 6px;
    text-align: left;
    user-select: none
}

tbody tr {
    background: #0d1320;
    border: 1px solid var(--border);
}

tbody tr td {
    padding: 8px;
    vertical-align: middle;
    position: relative
}

tbody tr {
    border-radius: 12px;
}

body .card tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px
}

body .card tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px
}

.rank {
    font-variant-numeric: tabular-nums;
    font-weight: 700
}

.score {
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    color: var(--accent)
}

.accuracy {
    font-variant-numeric: tabular-nums
}

.combo {
    font-variant-numeric: tabular-nums
}

.user {
    display: flex;
    align-items: center;
    gap: 12px
}

.avatar {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0b0f17
}

.muted {
    color: var(--muted);
    font-size: 12px
}

/* Fullscreen overlay */
.fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.fullscreen-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
}

.fullscreen-overlay.active {
    display: flex;
    animation: fadeIn .25s ease
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 760px) {
    thead {
        display: none
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%
    }

    tbody tr {
        margin: 10px 0
    }

    tbody tr td {
        display: flex;
        justify-content: space-between
    }

    tbody tr td::before {
        content: attr(data-label);
        color: #9ca3af
    }
}