/* 
 * stats.css - MeinTango
 * Statistiken und Leaderboards
 */

.stats-container {
    margin-bottom: 3rem;
}

/* Tabs */
.stats-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.stats-tab {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.stats-tab:hover {
    color: var(--primary-red);
    background: #fff5f5;
}

.stats-tab.active {
    background: var(--primary-red);
    color: var(--white);
}

/* Leaderboard Table */
.leaderboard-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #edf2f7;
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Manrope', sans-serif;
}

.leaderboard-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 2px solid #edf2f7;
    white-space: nowrap;
}

.leaderboard-table th.sortable {
    cursor: pointer;
    transition: background 0.2s;
}

.leaderboard-table th.sortable:hover {
    background: #f1f5f9;
    color: var(--primary-red);
}

.leaderboard-table th .sort-icon {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.7rem;
    opacity: 0.5;
}

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

.leaderboard-table th.active-sort .sort-icon {
    opacity: 1;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

.leaderboard-table tr:hover {
    background: #fffcfc;
}

/* Partner Column */
.partner-col {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 200px;
}

.partner-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.partner-name {
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.partner-name:hover {
    color: var(--primary-red);
}

.partner-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
}

/* Value Columns */
.value-col {
    font-family: 'Noto Serif', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-red);
    text-align: center;
}

.notes-vol-col {
    cursor: pointer;
    text-decoration: underline dotted var(--accent-gold);
    color: var(--text-color);
}

.notes-vol-col:hover {
    color: var(--primary-red);
    background: #fff5f5;
}

.last-event-col {
    font-size: 0.85rem;
    min-width: 150px;
}

.last-event-date {
    display: block;
    font-weight: 600;
}

.last-event-title {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: block;
}

/* History in Bottom Sheet */
.history-item {
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px dashed #e2e8f0;
}

.history-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.history-date {
    font-weight: bold;
    color: var(--primary-red);
    font-size: 0.9rem;
}

.history-event {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
}

.history-notes {
    font-family: 'Noto Serif', serif;
    font-size: 1rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.history-dj {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 600;
}

@media (max-width: 600px) {
    .leaderboard-table th, .leaderboard-table td {
        padding: 0.8rem 0.5rem;
    }
    
    .value-col {
        font-size: 1rem;
    }
}
