/**
 * stats-common.css — Shared styles for song-stats leaderboard & milestone pages
 * Extracted from engagement, like-ratio, most-liked, views-per-day, fastest-100m, milestones
 */

/* Screen-reader-only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Page Layout */
.leaderboard-page,
.milestones-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.back-link:hover { color: var(--accent); }

.page-header h1 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-secondary);
}

/* Leaderboard & Milestones Tables */
.leaderboard-table,
.milestones-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.02);
    border-radius: 16px;
    overflow: hidden;
}

.leaderboard-table th,
.milestones-table th {
    background: rgba(232,184,74,0.1);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-table td,
.milestones-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}

.leaderboard-table tr:hover td,
.milestones-table tr:hover td {
    background: rgba(232,184,74,0.05);
}

/* Rank Cell */
.rank-cell {
    font-weight: 700;
    color: var(--text-muted);
    width: 50px;
    text-align: center;
}
.rank-cell.top-3 { color: var(--accent); font-size: 1.2rem; }

/* Song Cell */
.song-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-thumb {
    width: 60px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.song-info a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.song-info a:hover { text-decoration: underline; }

.song-artist {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 3px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination a {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

.pagination a:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    color: #000;
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Page Info */
.page-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 15px;
    text-align: center;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results h3 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.no-results p {
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* VPD Label (shared between views-per-day & fastest-100m) */
.vpd-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .leaderboard-page,
    .milestones-page { padding: 15px; }

    .page-header h1 { font-size: 1.6rem; }

    .leaderboard-table th,
    .leaderboard-table td,
    .milestones-table th,
    .milestones-table td { padding: 10px 8px; }

    .song-thumb { width: 50px; height: 38px; }
    .song-info a { font-size: 0.9rem; }

    .hide-mobile { display: none; }
}
