/* =========================================================
   CIR – gemeinsame Beta-Statistiken
   ========================================================= */


/* Statistikseite nutzt auf großen Monitoren mehr von der verfügbaren Breite. */
.statistics-content-page {
    padding-right: 32px;
    padding-left: 32px;
}

.statistics-content-page .statistics-page {
    max-width: 1480px;
}

.statistics-dashboard[hidden],
.statistics-match-detail[hidden],
.statistics-message[hidden],
.statistics-table-wrapper[hidden],
#statistics-detail-content[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.statistics-dashboard {
    margin-top: 12px;
}

.statistics-dashboard-header,
.statistics-section-heading,
.statistics-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.statistics-dashboard-header {
    margin-bottom: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.statistics-dashboard-kicker,
.statistics-section-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.statistics-dashboard .statistics-dashboard-header h2,
.statistics-dashboard .statistics-section-heading h2,
.statistics-dashboard .statistics-detail-header h2 {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.1;
    text-shadow: none;
}

.statistics-dashboard .statistics-dashboard-header h2::before,
.statistics-dashboard .statistics-section-heading h2::before,
.statistics-dashboard .statistics-detail-header h2::before {
    display: none;
}

.statistics-player-line {
    margin: 10px 0 0 !important;
    color: #c8daf8 !important;
    font-size: 0.95rem !important;
}

.statistics-access-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 7px 11px;
    color: #86efac;
    background: rgba(34, 197, 94, 0.13);
    border: 1px solid rgba(34, 197, 94, 0.48);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.statistics-dashboard-note {
    max-width: none !important;
    margin: 0 0 24px !important;
    padding: 15px 17px;
    color: #aebfdf !important;
    background: rgba(74, 163, 255, 0.06);
    border: 1px solid rgba(74, 163, 255, 0.18);
    border-radius: 13px;
    font-size: 0.94rem !important;
    line-height: 1.55 !important;
}

.statistics-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 34px;
}

.statistics-summary-card {
    min-width: 0;
    padding: 17px 18px;
    background:
        linear-gradient(
            180deg,
            rgba(25, 45, 78, 0.72),
            rgba(13, 27, 51, 0.72)
        );
    border: 1px solid rgba(74, 163, 255, 0.2);
    border-radius: 15px;
}

.statistics-summary-card span {
    display: block;
    margin-bottom: 8px;
    color: #8fa9d3;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.statistics-summary-card strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    font-weight: 950;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.statistics-table-section {
    padding-top: 24px;
    border-top: 1px solid rgba(74, 163, 255, 0.28);
}

.statistics-section-heading {
    align-items: center;
    margin-bottom: 16px;
}

.statistics-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #98afd4;
    font-size: 0.82rem;
    white-space: nowrap;
}

.statistics-page-button,
.statistics-detail-close,
.statistics-detail-button {
    appearance: none;
    border: 1px solid rgba(74, 163, 255, 0.34);
    border-radius: 9px;
    background: rgba(74, 163, 255, 0.09);
    color: #dcecff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 150ms ease,
        border-color 150ms ease,
        transform 150ms ease;
}

.statistics-page-button,
.statistics-detail-close {
    padding: 8px 11px;
    font-size: 0.78rem;
}

.statistics-detail-button {
    padding: 7px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.statistics-page-button:hover:not(:disabled),
.statistics-detail-close:hover,
.statistics-detail-button:hover {
    background: rgba(74, 163, 255, 0.18);
    border-color: rgba(74, 163, 255, 0.58);
    transform: translateY(-1px);
}

.statistics-page-button:disabled {
    opacity: 0.38;
    cursor: default;
}

.statistics-message {
    padding: 18px 20px;
    color: #aebfdf;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
}

.statistics-message--error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.28);
}

.statistics-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(74, 163, 255, 0.18);
    border-radius: 14px;
}

.statistics-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 0.81rem;
}

.statistics-table th,
.statistics-table td {
    padding: 11px 8px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.statistics-table th {
    color: #81bdf2;
    background: rgba(74, 163, 255, 0.07);
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.statistics-table td {
    color: #c7d6ef;
    font-variant-numeric: tabular-nums;
}

.statistics-table tbody tr:last-child td {
    border-bottom: 0;
}

.statistics-table tbody tr:hover {
    background: rgba(74, 163, 255, 0.045);
}

.statistics-table-primary {
    color: #ffffff;
    font-weight: 850;
}

.statistics-table-secondary {
    display: block;
    margin-top: 3px;
    color: #7289ad;
    font-size: 0.72rem;
}

.statistics-result,
.statistics-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.09);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.statistics-result--win {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.11);
}

.statistics-result--loss {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

.statistics-result--draw {
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
}

.statistics-status--ok {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.38);
    background: rgba(59, 130, 246, 0.1);
}

.statistics-boolean--yes {
    color: #86efac;
    font-weight: 850;
}

.statistics-boolean--no {
    color: #fca5a5;
    font-weight: 850;
}

.statistics-match-detail {
    margin-top: 28px;
    padding: 22px;
    background: rgba(8, 18, 36, 0.78);
    border: 1px solid rgba(74, 163, 255, 0.25);
    border-radius: 16px;
}

.statistics-detail-header {
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.statistics-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.statistics-detail-card {
    min-width: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
}

.statistics-detail-card h3 {
    margin: 0 0 12px;
    color: #81bdf2;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.statistics-detail-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    margin: 0;
}

.statistics-detail-list dt {
    color: #8299bf;
    font-size: 0.82rem;
}

.statistics-detail-list dd {
    margin: 0;
    color: #e4ecfa;
    font-size: 0.84rem;
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
}


.statistics-view-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 5px;
    background: rgba(8, 18, 36, 0.65);
    border: 1px solid rgba(74, 163, 255, 0.2);
    border-radius: 12px;
}

.statistics-view-tab {
    appearance: none;
    padding: 10px 16px;
    color: #91a8cd;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.statistics-view-tab:hover,
.statistics-view-tab.is-active {
    color: #ffffff;
    background: rgba(74, 163, 255, 0.13);
    border-color: rgba(74, 163, 255, 0.4);
}

.statistics-dashboard[data-active-scope="personal"] .statistics-player-column {
    display: none;
}

.statistics-personal-analysis {
    margin-bottom: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(74, 163, 255, 0.28);
}

.statistics-personal-analysis[hidden] {
    display: none !important;
}

.statistics-sample-note {
    margin: -2px 0 16px !important;
    color: #8fa9d3 !important;
    font-size: 0.84rem !important;
}

.statistics-comparison-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid rgba(74, 163, 255, 0.18);
    border-radius: 13px;
}

.statistics-comparison-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.statistics-comparison-table th,
.statistics-comparison-table td {
    padding: 11px 14px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-variant-numeric: tabular-nums;
}

.statistics-comparison-table th:first-child,
.statistics-comparison-table td:first-child {
    text-align: left;
}

.statistics-comparison-table thead th {
    color: #81bdf2;
    background: rgba(74, 163, 255, 0.07);
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.statistics-comparison-table tbody th {
    color: #c8daf8;
    font-weight: 800;
}

.statistics-comparison-table tbody td {
    color: #b8c9e5;
}

.statistics-comparison-table tbody tr:last-child th,
.statistics-comparison-table tbody tr:last-child td {
    border-bottom: 0;
}

.statistics-comparison-own {
    color: #ffffff !important;
    font-weight: 900;
}

.statistics-delta {
    color: #cbd5e1 !important;
    font-weight: 900;
}

.statistics-delta--positive {
    color: #86efac !important;
}

.statistics-delta--negative {
    color: #fca5a5 !important;
}

.statistics-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.statistics-chart-card {
    min-width: 0;
    padding: 17px;
    background: rgba(8, 18, 36, 0.58);
    border: 1px solid rgba(74, 163, 255, 0.18);
    border-radius: 14px;
}

.statistics-chart-card h3 {
    margin: 0 0 15px;
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.statistics-bar-chart,
.statistics-result-chart {
    display: grid;
    gap: 9px;
}

.statistics-bar-row,
.statistics-result-chart-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 9px;
}

.statistics-bar-label,
.statistics-result-chart-label {
    overflow: hidden;
    color: #8299bf;
    font-size: 0.7rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.statistics-bar-track,
.statistics-result-chart-track {
    position: relative;
    height: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.065);
    border-radius: 999px;
}

.statistics-bar-fill,
.statistics-result-chart-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(74, 163, 255, 0.65), rgba(99, 193, 255, 0.95));
    border-radius: inherit;
}

.statistics-result-chart-row--win .statistics-result-chart-fill {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.55), rgba(74, 222, 128, 0.95));
}

.statistics-result-chart-row--loss .statistics-result-chart-fill {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.55), rgba(248, 113, 113, 0.95));
}

.statistics-result-chart-row--draw .statistics-result-chart-fill {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.55), rgba(252, 211, 77, 0.95));
}

.statistics-bar-value,
.statistics-result-chart-value {
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.statistics-chart-empty {
    margin: 0 !important;
    color: #8299bf !important;
    font-size: 0.82rem !important;
}

@media (max-width: 1380px) {
    .statistics-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .statistics-chart-grid {
        grid-template-columns: 1fr;
    }

    .statistics-content-page {
        padding-right: 24px;
        padding-left: 24px;
    }

    .statistics-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .statistics-view-tabs {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .statistics-view-tab {
        width: 100%;
    }

    .statistics-dashboard-header,
    .statistics-section-heading,
    .statistics-detail-header {
        flex-direction: column;
        align-items: stretch;
    }

    .statistics-access-badge {
        width: fit-content;
    }

    .statistics-summary-grid,
    .statistics-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .statistics-pagination {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .statistics-bar-row,
    .statistics-result-chart-row {
        grid-template-columns: 64px minmax(0, 1fr) 48px;
    }

    .statistics-summary-grid,
    .statistics-detail-grid {
        grid-template-columns: 1fr;
    }

    .statistics-match-detail {
        padding: 17px;
    }
}
