.stats-page-pro {
    padding: 1.5rem;
}

.stats-card,
.stats-sidebar,
.stats-main {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    background: rgba(255,255,255,0.045);
    box-shadow: 0 18px 55px rgba(0,0,0,0.22);
}

.stats-card {
    padding: 1.5rem;
}

.stats-viewer {
    display: grid;
    grid-template-columns: 26rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.stats-sidebar {
    position: sticky;
    top: 1rem;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
}

.stats-avatar {
    width: 8rem;
    height: 8rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #ff9d33, #ffc75c);
    color: white;
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 0 45px rgba(255,157,51,0.28);
    font-size: 3.2rem;
    font-weight: 900;
}

.stats-sidebar h1 {
    margin: 0;
    font-size: 2.35rem;
    text-align: center;
}

.stats-muted,
.stats-empty {
    color: rgba(255,255,255,0.62);
}

.stats-sidebar > .stats-muted {
    text-align: center;
}

.stats-mode-tabs,
.stats-tabs {
    display: flex;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stats-mode-tabs {
    margin: 1.5rem 0 1rem;
}

.stats-tabs {
    margin-bottom: 1rem;
}

.stats-mode-tabs button,
.stats-tabs button {
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font: inherit;
    font-weight: 900;
    padding: 0 0 0.75rem;
    cursor: pointer;
}

.stats-mode-tabs button {
    flex: 1;
}

.stats-mode-tabs button.active,
.stats-tabs button.active {
    color: white;
    border-bottom: 3px solid #ff9d33;
}

.stats-mode-tabs button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.stats-points-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.stats-points-grid div {
    padding: 0.8rem;
    border-radius: 0.9rem;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.06);
}

.stats-points-grid span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.52);
    text-transform: uppercase;
    font-weight: 800;
}

.stats-points-grid strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.1rem;
}

.stats-rank-box {
    margin-top: 1rem;
}

.stats-rank-box h3 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-rank-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.stats-rank-row span {
    color: rgba(255,255,255,0.62);
}

.stats-main {
    padding: 1.5rem;
    min-height: calc(100vh - 9rem);
}

.stats-main-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stats-main-header h2 {
    margin: 0;
    font-size: 2.5rem;
}

.stats-summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stats-summary-pills span {
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.72);
    font-weight: 800;
}

.stats-record-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.stats-level-card {
    position: relative;
    min-height: 7rem;
    overflow: hidden;
    border-radius: 1.15rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 16px 42px rgba(0,0,0,0.18);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stats-level-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,157,51,0.35);
    box-shadow:
        0 0 35px rgba(255,157,51,0.18),
        0 18px 40px rgba(0,0,0,0.22);
}

.stats-level-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    filter: brightness(0.62) saturate(0.9);
    transform: scale(1.08);
}

.stats-level-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.86) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.86) 100%),
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
}

.stats-level-content {
    position: relative;
    z-index: 2;
    min-height: 7rem;
    display: grid;
    grid-template-columns: 1fr max-content;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.stats-level-content h3 {
    margin: 0;
    color: white;
    font-size: 1.45rem;
    font-weight: 900;
    text-shadow: 0 3px 12px rgba(0,0,0,0.7);
}

.stats-level-content p {
    margin: 0.25rem 0 0;
    color: rgba(255,255,255,0.86);
}

.stats-fv-tag {
    display: inline-block;
    margin-left: 0.6rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd76a, #f2ae2e);
    color: #352000;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    vertical-align: middle;
    text-shadow: none;
}

@media (max-width: 1000px) {
    .stats-viewer {
        grid-template-columns: 1fr;
    }

    .stats-sidebar {
        position: static;
    }

    .stats-main-header,
    .stats-level-content {
        grid-template-columns: 1fr;
    }
}
