.stadium-stats {
    --card: #151518;
    --text: #f2f2f5;
    --muted: #a5a7b0;
    --line: #27272b;
    --accent: #e2e2e6;
    --radius: 14px;
    max-width: 980px;
    margin: 40px auto;
    padding: 0 16px;
}

.stadium-stats, .stadium-stats * { box-sizing: border-box; }
.stadium-stats .stat-period { margin: 0 0 12px; }
.stadium-stats .lead { margin: 18px auto 28px; color: var(--muted); max-width: 880px; }

.stadium-stats .stat-card {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .02) inset;
}

.stadium-stats .stat-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    text-align: center;
}

.stadium-stats .stat-table-scroll { overflow-x: auto; }
.stadium-stats .stat-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.stadium-stats .stat-table th,
.stadium-stats .stat-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: center;
    white-space: nowrap;
}

.stadium-stats .stat-table th { font-weight: 700; color: var(--accent); background: #1a1a1e; }
.stadium-stats .stat-table thead th:first-child { border-top-left-radius: 10px; }
.stadium-stats .stat-table thead th:last-child { border-top-right-radius: 10px; }
.stadium-stats .stat-table tr:last-child td { border-bottom: none; }

.stadium-stats .stat-table .stat-score-link { color: #12d0a7; }
.stadium-stats .stat-table .stat-score-link:hover,
.stadium-stats .stat-table .stat-score-link:focus-visible { text-decoration: underline; }
.stadium-stats .stat-table .stat-score-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.stadium-stats .stat-grid > .stat-card:has(> .stat-match-details) {
    background-position: center top;
    background-size: auto 140px;
}

.stadium-stats .stat-card > .stat-match-details {
    margin: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 0;
    color: var(--text);
}

.stadium-stats .stat-match-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 0;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.stadium-stats .stat-match-details > summary:hover,
.stadium-stats .stat-match-details[open] > summary { color: var(--text); }
.stadium-stats .stat-match-details > summary:focus-visible {
    outline: 2px solid #12d0a7;
    outline-offset: 2px;
}

.stadium-stats .stat-match-details > summary::-webkit-details-marker { display: none; }
.stadium-stats .stat-match-details > summary::before { content: none; }
.stadium-stats .stat-match-details > summary::after {
    content: "";
    flex: 0 0 7px;
    height: 7px;
    margin-right: 4px;
    border: solid #12d0a7;
    border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
}

.stadium-stats .stat-match-details[open] > summary::after { transform: translateY(2px) rotate(225deg); }

.stadium-stats .stat-match-scroll {
    max-height: 60vh;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
}

.stadium-stats .stat-match-scroll th { position: sticky; top: 0; }
.stadium-stats .stat-match-scroll th:nth-child(3),
.stadium-stats .stat-match-scroll th:nth-child(4),
.stadium-stats .stat-match-scroll td:nth-child(3),
.stadium-stats .stat-match-scroll td:nth-child(4) {
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    .stadium-stats .stat-card { padding: 10px; }
    .stadium-stats .stat-grid > .stat-card:has(> .stat-match-details) { background-size: auto 108px; }
    .stadium-stats .stat-table th,
    .stadium-stats .stat-table td { padding: 8px 5px; font-size: 12px; }

    .stadium-stats .stat-match-scroll .stat-table { table-layout: fixed; min-width: 420px; }
    .stadium-stats .stat-match-scroll th:first-child { width: 7%; }
    .stadium-stats .stat-match-scroll th:nth-child(2) { width: 18%; }
    .stadium-stats .stat-match-scroll th:nth-child(5) { width: 9%; }
    .stadium-stats .stat-match-scroll th:last-child { width: 24%; }
    .stadium-stats .stat-match-scroll th,
    .stadium-stats .stat-match-scroll td { padding-inline: 3px; }
}
