/* GLOBAL SETTINGS & VARIABLES */
:root {
    --accent-color: #38bdf8;
    --bg-dark: #0a0f1d;
    --card-bg: #111827;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-muted: #64748b;
    --glass-bg: rgba(30, 41, 59, 0.6);
}

/* RESET & BODY */
body { 
    background-color: var(--bg-dark); 
    color: #f1f5f9; 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    padding: 0;
    /* Platz für fixierten elfpedia Header */
    padding-top: calc(var(--header-height-desktop, 80px) + 20px) !important;
}

@media (max-width: 768px) {
    body { padding-top: calc(var(--header-height-mobile, 70px) + 10px) !important; }
}

/* ARCHIVE WRAPPER & TYPOGRAPHY */
.stats-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

h1 { 
    font-weight: 900; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    text-align: center; 
    margin-bottom: 30px;
    color: #fff;
}

.season-notice { 
    background: rgba(56, 189, 248, 0.1); 
    border: 1px solid var(--accent-color); 
    padding: 15px; 
    border-radius: 12px; 
    font-size: 0.85rem; 
    margin-bottom: 25px; 
    color: var(--accent-color);
    text-align: center;
}

/* CONTROLS & FILTERS */
.controls { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    margin-bottom: 25px; 
    background: #111827;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color); 
}

.filter-item {
    display: flex;
    flex-direction: column;
    min-width: 0; 
}

.filter-item label { 
    display: block; 
    font-size: 0.7rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    margin-bottom: 8px; 
}

/* Sortierfeld in neuer Zeile innerhalb des Grids */
.filter-item.sort-field {
    grid-column: 1; 
    margin-top: 10px;
}

@media (max-width: 1100px) {
    .controls { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .controls { grid-template-columns: 1fr; }
    .filter-item.sort-field { grid-column: auto; }
}

/* INPUT & SELECT STYLES */
input, select {
    width: 100%;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 14px !important;
    margin-top: 4px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus, select:focus {
    border-color: var(--accent-color);
}

/* TABLE STYLES */
.table-container { 
    background: var(--card-bg); 
    border-radius: 14px; 
    border: 1px solid var(--border-color); 
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 1100px; /* Erhöht, damit alle 10 Spalten Platz haben */
    table-layout: fixed; /* Verhindert das Springen der Spalten */
}

th { 
    background: #1e293b; 
    color: var(--text-muted); 
    font-size: 0.7rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

td { padding: 15px; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Spaltenbreiten Fixierung */
.col-main { width: 220px !important; font-weight: 800; color: #fff; }
th:nth-child(2), td:nth-child(2) { width: 60px; } /* POS */
.num { width: 70px; font-family: 'Inter', sans-serif; font-weight: 700; text-align: right; }
.accent-num { color: var(--accent-color); font-weight: 900; }

/* INTERACTIVE ROWS */
.master-row { cursor: pointer; transition: background 0.2s; }
.master-row:hover { background: rgba(56, 189, 248, 0.05); }

.details-row { display: none; background: #0f172a; }
.details-row.show { display: table-row; }

.sub-table { 
    width: 100%; 
    font-size: 0.8rem; 
    background: transparent; 
    table-layout: auto; 
    min-width: auto; 
}
.sub-table th { background: transparent; border-bottom: 1px solid #334155; padding: 10px; color: #94a3b8; width: auto !important;}
.sub-table td { border-bottom: 1px solid rgba(255,255,255,0.05); padding: 10px; width: auto !important; }

.chevron { 
    display: inline-block; 
    margin-right: 12px; 
    color: var(--accent-color); 
    transition: transform 0.2s; 
    font-size: 0.7rem;
}
.master-row.active .chevron { transform: rotate(90deg); }


.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.btn-secondary, .btn-reset {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.btn-secondary { background: rgba(56, 189, 248, 0.1); color: var(--accent-color); }
.btn-secondary:hover { background: var(--accent-color); color: #000; }

.btn-reset { background: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
.btn-reset:hover { background: #ef4444; color: #fff; }

/* MISC */
.glass { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--border-color); }
.title-font { font-family: 'Syncopate', sans-serif; }