/* =================================================================== */
/* === FINALE, SICHERE VERSION mit spezifischen CSS-Selektoren      === */
/* === Diese Regeln gelten NUR innerhalb von #stats-content-area   === */
/* =================================================================== */

#stats-content-area .panel-section h4 {
    color: #00aaff;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

#stats-content-area .section-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    margin: 30px 0;
}

#stats-content-area .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

#stats-content-area .stat-card-inline {
    background-color: #2c2c2e;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #444;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#stats-content-area .stat-card-inline:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.15);
    border-color: #00aaff;
}

/* HINWEIS: Selbst diese generische h4 ist jetzt sicher, weil sie nur innerhalb von .stat-card-inline greift, was wiederum nur innerhalb von #stats-content-area greift. */
#stats-content-area .stat-card-inline h4 {
    font-size: 0.85em;
    color: #b0b0b0;
    margin: 0 0 12px 0;
    font-weight: 500;
    border: none;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#stats-content-area .stat-card-inline .stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1;
}

#stats-content-area .stat-card-inline .stat-number .unit {
    font-size: 0.5em;
    font-weight: 400;
    color: #aaa;
    margin-left: 4px;
}

#stats-content-area .charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
}

#stats-content-area .chart-wrapper {
    flex: 1;
    min-width: 280px;
    background-color: #2c2c2e;
    border: 1px solid #444;
    padding: 20px;
    border-radius: 8px;
}

#stats-content-area .leaderboard {
    margin-top: 25px;
    background-color: #2c2c2e;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
}

#stats-content-area .leaderboard-item {
    display: grid;
    grid-template-columns: 35px 1fr auto; /* Icon, Label, Wert */
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid #444;
    transition: background-color 0.2s ease;
}

#stats-content-area .leaderboard-item:hover {
    background-color: #38383a;
}

#stats-content-area .leaderboard-item:last-child {
    border-bottom: none;
}

#stats-content-area .leaderboard-icon {
    font-size: 1.5em;
    text-align: center;
}

#stats-content-area .leaderboard-label {
    color: #c5c5c5;
    font-weight: 500;
}

#stats-content-area .leaderboard-value {
    color: #f0f0f0;
    text-align: right;
    font-size: 0.9em;
    font-weight: 600;
    font-family: 'Courier New', Courier, monospace;
}

#stats-content-area .leaderboard-value a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

#stats-content-area .leaderboard-value a:hover {
    color: #00aaff;
    text-decoration: underline;
    cursor: pointer;
}


/* KOPIERVORLAGE FÜR public/style.css (am Ende hinzufügen) */

/* === NEUE LEADERBOARD-REGELN (Grid-System) === */
#stats-content-area .leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

#stats-content-area .leaderboard-category {
    background-color: #2c2c2e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
}

#stats-content-area .leaderboard-category h5 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
    color: #00aaff;
    font-size: 1em;
    font-weight: 600;
}

#stats-content-area .leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#stats-content-area .leaderboard-item {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
#stats-content-area .leaderboard-item.empty {
    color: #888;
    font-style: italic;
    grid-template-columns: 1fr;
    text-align: center;
}


#stats-content-area .leaderboard-item:hover:not(.empty) {
    background-color: #3a3a3c;
}

#stats-content-area .leaderboard-rank {
    font-size: 0.85em;
    color: #999;
    font-weight: 700;
}

#stats-content-area .leaderboard-label a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9em;
}

#stats-content-area .leaderboard-label a:hover {
    text-decoration: underline;
    color: #00aaff;
}

#stats-content-area .leaderboard-value {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    font-size: 0.95em;
    color: #fff;
    background-color: #1e1e1e;
    padding: 3px 6px;
    border-radius: 4px;
    justify-self: end;
}
