.stats-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.stats-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 10, 16, 0.68);
    backdrop-filter: blur(4px);
}

.stats-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(900px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 28px;
    border: 1px solid #2a3442;
    border-radius: 16px;
    background: #151922;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.stats-title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 18px;
}

.stats-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 1px solid #3a4658;
    border-radius: 10px;
    background: #1d2633;
    color: #e9eef5;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.stats-close-btn:hover {
    background: #253244;
    border-color: #51627c;
}

.stats-today-card {
    margin-bottom: 12px;
    padding: 18px 22px 20px;
    border: 1px solid #35506b;
    border-radius: 14px;
    background: linear-gradient(180deg, #1a2736 0%, #111824 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stats-today-card.perfect-day {
    border-color: #6c8fb6;
    background: linear-gradient(180deg, #23364b 0%, #121a26 100%);
    box-shadow:
        0 0 0 1px rgba(143, 211, 255, 0.12) inset,
        0 0 28px rgba(143, 211, 255, 0.08);
}

.stats-game-date {
    font-size: 13px;
    color: #b7c4d4;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.stats-today-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 24px;
    align-items: end;
}

.stats-today-score {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
}

.stats-today-secondary {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.stats-divider {
    margin: 20px 0 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stats-card {
    padding: 16px 18px;
    border: 1px solid #2a3442;
    border-radius: 12px;
    background: #111824;
}

.stats-card-label {
    margin-bottom: 10px;
}

.stats-card-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.stats-card-subvalue {
    margin-top: 8px;
    font-size: 14px;
    color: #b7c4d4;
    line-height: 1.3;
}

.stats-chart-wrap {
    padding: 16px 18px 18px;
    border: 1px solid #2a3442;
    border-radius: 12px;
    background: #111824;
}

.stats-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.stats-chart-caption {
    font-size: 13px;
    color: #b7c4d4;
}

.stats-chart {
    display: block;
    width: 100%;
    height: 240px;
}

@media (max-width: 760px) {
    .stats-today-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-chart-header {
        display: block;
    }

    .stats-chart-caption {
        margin-top: 6px;
    }

    .stats-today-score {
        font-size: 42px;
    }

    .stats-today-secondary,
    .stats-card-value {
        font-size: 24px;
    }
}