/* ──────────────────────────────────────────────────────────────────
 * Rankings + Championship — gemeinsames CSS (Theme-übergreifend)
 * ──────────────────────────────────────────────────────────────────
 * Wird auf der Profil-Seite (Rank-Karten) und der Championship-Seite
 * (Podium + Tabelle) verwendet. Tier-Farben kommen via CSS-Variable
 * --tier-color inline auf den Elementen.
 * ─────────────────────────────────────────────────────────────────*/

/* ─── Rank-Karten im Profil-Header ───────────────────────────────── */
.ranking-cards-wrap {
    display: flex;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}
.rank-card {
    background: linear-gradient(145deg, rgba(20,20,30,0.95), rgba(15,15,25,0.95));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}
.rank-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--tier-color);
    box-shadow: 0 0 12px var(--tier-color);
}
.rank-card-head {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 4px;
}
.rank-card-head i {
    color: var(--tier-color);
    margin-right: 4px;
}
.rank-card-pos {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 28px;
    color: var(--tier-color);
    line-height: 1;
    text-shadow: 0 0 14px var(--tier-color);
}
.rank-card-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 4px 0;
    font-size: 11px;
}
.rank-tier {
    font-weight: 700;
    color: var(--tier-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.rank-of { color: #666; font-size: 10px; }
.rank-card-score {
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
}
@media (max-width: 800px) {
    .ranking-cards-wrap { margin-left: 0; margin-top: 12px; flex-wrap: wrap; }
}

/* ─── Championship Seite ─────────────────────────────────────────── */
.champ-page {
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    padding: 20px 0;
}
.champ-header { margin-bottom: 24px; }
.champ-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 32px;
    letter-spacing: 2px;
    margin: 0 0 6px 0;
}
.champ-header .accent {
    color: var(--primary, #e8232a);
    text-shadow: 0 0 12px rgba(232,35,42,0.4);
}
.champ-header p { color: #888; margin: 0; }

/* Mode-Switch (Casual/Pro) */
.champ-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}
.champ-mode {
    display: flex; flex-direction: column;
    padding: 18px 22px;
    background: rgba(20,20,30,0.7);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.champ-mode i {
    position: absolute;
    top: 12px; right: 16px;
    font-size: 32px;
    color: rgba(255,255,255,0.05);
}
.champ-mode .cm-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    letter-spacing: 2px;
}
.champ-mode .cm-sub { color: #888; font-size: 11px; margin-top: 2px; }
.champ-mode:hover { border-color: rgba(0,210,255,0.3); background: rgba(0,210,255,0.05); }
.champ-mode.active {
    border-color: var(--primary, #e8232a);
    background: linear-gradient(135deg, rgba(232,35,42,0.1), rgba(232,35,42,0.02));
}
.champ-mode.active i { color: rgba(232,35,42,0.4); }

/* Spielersuche */
.champ-search-form { margin-bottom: 24px; }
.champ-search-wrap {
    display: flex;
    align-items: center;
    background: rgba(20,20,30,0.7);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.15s;
}
.champ-search-wrap:focus-within {
    border-color: rgba(0,210,255,0.4);
    background: rgba(20,20,30,0.9);
}
.champ-search-wrap > i.fa-search {
    color: #555;
    margin-right: 10px;
    font-size: 13px;
}
.champ-search-wrap input[type="text"] {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
    padding: 10px 6px;
}
.champ-search-wrap input::placeholder { color: #555; }
.champ-search-clear {
    color: #666;
    padding: 6px 10px;
    text-decoration: none;
    font-size: 12px;
}
.champ-search-clear:hover { color: #ff4444; }
.champ-search-btn {
    background: var(--primary, #e8232a);
    color: #fff;
    border: 0;
    padding: 8px 20px;
    border-radius: 7px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.15s;
}
.champ-search-btn:hover { background: #ff4444; }
.champ-search-info {
    margin-top: 10px;
    padding: 8px 14px;
    background: rgba(0,210,255,0.08);
    border-left: 3px solid #00d2ff;
    border-radius: 6px;
    color: #aaa;
    font-size: 12px;
}
.champ-search-info i { color: #00d2ff; margin-right: 6px; }
.champ-search-info strong { color: #fff; }

/* Empty State */
.champ-empty {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    background: rgba(20,20,30,0.4);
    border-radius: 12px;
}
.champ-empty h3 { color: #aaa; margin: 16px 0 8px 0; }

/* Podium (Top 3) */
.champ-podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
    align-items: end;
}
.podium-slot {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 14px;
    background: linear-gradient(165deg, rgba(20,20,30,0.95), rgba(15,15,20,0.95));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.podium-slot::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--tier-color);
    box-shadow: 0 0 16px var(--tier-color);
}
.podium-slot:hover { transform: translateY(-4px); }
.pod-1 { padding: 30px 14px; transform: translateY(-12px); border-color: var(--tier-color); }
.pod-rank {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 36px;
    color: var(--tier-color);
    text-shadow: 0 0 16px var(--tier-color);
    line-height: 1;
}
.pod-1 .pod-rank { font-size: 48px; }
.pod-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    margin: 12px 0;
    border: 3px solid var(--tier-color);
    box-shadow: 0 0 16px var(--tier-color);
}
.pod-1 .pod-avatar { width: 80px; height: 80px; }
.pod-avatar-placeholder {
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    color: var(--tier-color);
    font-size: 28px;
}
.pod-name { font-weight: 700; font-size: 14px; text-align: center; }
.pod-tier {
    font-size: 10px;
    color: var(--tier-color);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}
.pod-score {
    font-family: 'Orbitron', monospace;
    color: #888;
    font-size: 12px;
    margin-top: 8px;
}

/* Tabelle */
.champ-table-wrap {
    background: rgba(20,20,30,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
}
.champ-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.champ-table th {
    background: rgba(0,0,0,0.3);
    text-align: left;
    padding: 14px 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #888;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.champ-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid transparent;
}
.champ-table tbody tr { transition: background 0.15s; }
.champ-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
    border-left-color: var(--tier-color);
}
.col-rank {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--tier-color);
    width: 60px;
}
.driver-cell {
    display: flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none;
}
.driver-cell:hover .driver-name { color: var(--tier-color); }
.tbl-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--tier-color);
}
.tbl-avatar-placeholder {
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    color: var(--tier-color);
    font-size: 12px;
}
.tier-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tier-color);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--tier-color);
}
.col-score {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: #fff;
}
.col-stat { color: #aaa; font-family: monospace; }

/* Responsive */
@media (max-width: 768px) {
    .champ-mode-switch { grid-template-columns: 1fr; }
    .champ-podium { grid-template-columns: 1fr; }
    .pod-1 { transform: none; }
    .champ-table { font-size: 11px; }
    .champ-table th, .champ-table td { padding: 8px; }
}
