.results-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.results-header {
    text-align: center;
    margin-bottom: 50px;
}

.results-header h1 {
    font-size: 2rem;
    margin: 0 0 8px;
}

.results-header p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0 0 24px;
}

/* Competition tabs */
.comp-tabs {
    display: flex;
    gap: 4px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    max-width: 500px;
    margin: 0 auto;
}

.comp-tab {
    flex: 1;
    padding: 10px 16px;
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.comp-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.comp-tab.active {
    color: var(--primary);
    background: rgba(0, 255, 65, 0.08);
    border-color: rgba(0, 255, 65, 0.2);
}

.comp-panel {
    display: none;
}

.comp-panel.active {
    display: block;
}

/* Leaderboard card */
.leaderboard {
    border: 1px solid var(--border);
    margin-bottom: 48px;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 255, 65, 0.05);
}

.leaderboard-title {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-date {
    color: var(--muted);
    font-size: 0.8rem;
}

.leaderboard-count {
    color: var(--muted);
    font-size: 0.8rem;
    font-family: 'Space Mono', monospace;
}

/* Podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    padding: 32px 20px 0;
}

.podium-item {
    flex: 1;
    max-width: 200px;
    text-align: center;
    padding: 20px 10px 16px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    position: relative;
}

.podium-1 {
    min-height: 170px;
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.02) 100%);
    order: 2;
}

.podium-2 {
    min-height: 130px;
    border-color: rgba(192, 192, 192, 0.4);
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.1) 0%, rgba(192, 192, 192, 0.02) 100%);
    order: 1;
}

.podium-3 {
    min-height: 100px;
    border-color: rgba(205, 127, 50, 0.4);
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.1) 0%, rgba(205, 127, 50, 0.02) 100%);
    order: 3;
}

.podium-icon {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 6px;
}

.podium-place {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 10px;
}

.podium-code {
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    color: var(--text);
    margin-bottom: 8px;
    word-break: break-all;
    line-height: 1.3;
}

.podium-time {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.podium-msgs {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    color: var(--muted);
}

.podium-base {
    height: 3px;
    background: linear-gradient(90deg,
            transparent 5%,
            rgba(192, 192, 192, 0.3) 15%,
            rgba(255, 215, 0, 0.5) 50%,
            rgba(205, 127, 50, 0.3) 85%,
            transparent 95%);
    margin: 0 20px;
}

/* Table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.leaderboard-table th {
    text-align: left;
    padding: 10px 16px;
    color: var(--muted);
    font-size: 0.7rem;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.15s;
}

.leaderboard-table th:hover {
    color: var(--primary);
}

.leaderboard-table th .sort-arrow {
    font-size: 0.55rem;
    margin-left: 3px;
    opacity: 0.3;
}

.leaderboard-table th .sort-arrow.active {
    opacity: 1;
    color: var(--primary);
}

.leaderboard-table th.col-right {
    text-align: right;
}

.leaderboard-table td {
    padding: 9px 16px;
    border-bottom: 1px solid rgba(51, 51, 51, 0.4);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Top 10 highlight */
.top-10 {
    background: rgba(0, 255, 65, 0.02);
}

.top-10:hover {
    background: rgba(0, 255, 65, 0.05) !important;
}

.top-10-last td {
    border-bottom: 2px solid var(--border) !important;
}

.rank {
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    width: 50px;
    white-space: nowrap;
}

.rank-gold {
    color: #ffd700;
}

.rank-silver {
    color: #c0c0c0;
}

.rank-bronze {
    color: #cd7f32;
}

.rank-top10 {
    color: var(--primary);
    opacity: 0.7;
}

.rank-other {
    color: var(--muted);
}

.code {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
}

.msgs {
    text-align: right;
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted);
}

.time {
    text-align: right;
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    color: var(--text);
}

/* DNF */
.dnf-separator td {
    padding: 6px 16px;
    font-size: 0.68rem;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ff6666;
    background: rgba(255, 102, 102, 0.05);
    border-bottom: 1px solid rgba(255, 102, 102, 0.15) !important;
    border-top: 2px solid var(--border);
}

.dnf-row {
    opacity: 0.6;
}

.dnf-row:hover {
    opacity: 0.85;
}

.desktop-only { display: none; }
.mobile-only { display: inline; }
.narrow-only { display: inline; }
.not-narrow { display: none; }
@media (min-width: 391px) {
    .narrow-only { display: none; }
    .not-narrow { display: inline; }
}
@media (min-width: 769px) {
    .desktop-only { display: inline; }
    .mobile-only { display: none; }
}

.dnf-label {
    color: #ff6666;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.empty-msg {
    padding: 30px;
    text-align: center;
    color: var(--muted);
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-family: 'Space Mono', monospace;
}

.loading::after {
    content: '';
    animation: dots 1.5s steps(3) infinite;
}

@keyframes dots {
    0% {
        content: '.';
    }

    33% {
        content: '..';
    }

    66% {
        content: '...';
    }
}

.error-msg {
    text-align: center;
    padding: 40px 20px;
    color: #ff6666;
    font-family: 'Space Mono', monospace;
}
