/* ═══════════════════════════════════════════════════════════════════
   Standings / Tabelle
   ═══════════════════════════════════════════════════════════════════ */
.standings-page { max-width: 1100px; margin: 0 auto; }

.page-title {
    font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.page-title i { color: var(--accent); }

/* Controls Row */
.standings-controls {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem;
}

/* Liga-Tabs → styles moved to style.css (shared) */

/* Matchday Selector */
.matchday-selector {
    display: flex; align-items: center; gap: 0.5rem;
}
.matchday-selector label { color: var(--text-muted); font-size: 0.9rem; }
.md-select {
    padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-family: var(--font); font-size: 0.85rem;
    font-weight: 600; background: var(--white); color: var(--text);
    cursor: pointer; min-height: 44px;
}

.season-info {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-light);
}
.season-name { font-weight: 600; color: var(--text); }
.season-rules { font-size: 0.8rem; }

.table-wrapper {
    background: var(--white); border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200); overflow-x: auto;
}

.standings-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.standings-table thead { background: var(--gray-100); }
.standings-table th {
    padding: 0.6rem 0.5rem; text-align: center; font-weight: 600;
    font-size: 0.8rem; color: var(--gray-600); text-transform: uppercase;
    letter-spacing: 0.03em; border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.standings-table td { padding: 0.6rem 0.5rem; text-align: center; border-bottom: 1px solid var(--gray-100); }
.th-player, .td-player { text-align: left !important; }
.th-pos { width: 40px; }
.th-highlight { color: var(--primary) !important; }
.standings-table tbody tr:hover { background: rgba(196, 30, 42, 0.02); }

.pos-qualify { color: var(--primary); font-weight: 700; }
.pos-promote { color: var(--success); font-weight: 700; }
.pos-relegate { color: var(--danger); font-weight: 700; }

.td-player { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; white-space: nowrap; }
.player-info { display: flex; flex-direction: column; line-height: 1.3; }
.player-subtitle { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); }
.player-mini-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--gray-200); display: flex; align-items: center;
    justify-content: center; font-size: 0.7rem; font-weight: 700;
    color: var(--gray-600); flex-shrink: 0;
}
.td-points { font-weight: 800; color: var(--primary); font-size: 1rem; }
.td-avg { font-weight: 600; }
.td-diff-pos { color: var(--success); }
.td-diff-neg { color: var(--danger); }

.standings-legend {
    display: flex; gap: 1.5rem; margin-top: 1rem; font-size: 0.8rem; color: var(--text-light);
}
.legend-item { display: flex; align-items: center; gap: 0.35rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-qualify { background: var(--primary); }
.legend-promote { background: var(--success); }
.legend-relegate { background: var(--danger); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.3; }

/* ── Ewige Tabelle: Top 3 Podium ──────────────────────────────────── */
.pos-gold { color: #d4a017; font-weight: 800; }
.pos-silver { color: #9ca3af; font-weight: 800; }
.pos-bronze { color: #b87333; font-weight: 800; }

/* ── Ewige Tabelle: Rekorde ──────────────────────────────────────── */
.ewige-records {
    margin-top: 2rem;
}
.records-title {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.records-title i { color: #d4a017; }
.records-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.record-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg, 12px); overflow: hidden;
}
.record-card-title {
    padding: 0.75rem 1rem; font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--gray-50); color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}
.record-card-title i { color: var(--accent, #d4a017); margin-right: 0.3rem; }
.record-card-body { padding: 0.5rem; }
.record-entry {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.5rem; border-radius: var(--radius, 6px);
}
.record-entry:nth-child(odd) { background: var(--gray-50); }
.record-entry:first-child .record-value { color: #d4a017; }
.record-value {
    font-weight: 800; font-size: 0.95rem; min-width: 50px;
    color: var(--primary);
}
.record-player { font-weight: 600; font-size: 0.85rem; }
.record-season {
    margin-left: auto; font-size: 0.7rem; color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .hide-mobile { display: none; }
    .hide-mobile-sm { display: none; }
    .standings-table { font-size: 0.8rem; }
    .standings-table th { padding: 0.5rem 0.3rem; font-size: 0.7rem; }
    .standings-table td { padding: 0.5rem 0.3rem; }
    .standings-controls { flex-direction: column; align-items: stretch; }
    .records-grid { grid-template-columns: 1fr; }
    .td-player { white-space: normal; }
    .player-mini-avatar { width: 24px; height: 24px; font-size: 0.6rem; }
    .standings-legend { flex-wrap: wrap; gap: 0.75rem; }
}
