.stats-page {
    width: 100%;
}

.stats-container {
    width: min(calc(100% - 80px), 1600px);
    margin: 0 auto;
    padding: 60px 0 90px;
}

.stats-hero {
    margin-bottom: 42px;
}

.stats-eyebrow {
    display: block;
    color: #9b6cff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.7px;
}

.stats-hero h1 {
    margin: 10px 0;
    color: #ffffff;
    font-size: clamp(48px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -2px;
}

.stats-hero p {
    margin: 0;
    color: #8290a0;
    font-size: 18px;
}

.period-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.period-card {
    min-height: 330px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 16px;
}

.period-card-head {
    display: flex;
    align-items: center;
    gap: 13px;
}

.period-card-head>span {
    color: #aab4c0;
    font-size: 17px;
    font-weight: 800;
}

.period-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 11px;
    color: #9b6cff;
    font-size: 18px;
}

.period-main {
    margin-top: 30px;
    display: block;
    color: #ffffff;
    font-size: 54px;
    line-height: 1;
}

.period-main-label {
    margin-top: 7px;
    color: #8390a0;
    font-size: 15px;
}

.period-details {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.period-details span {
    color: #99a5b3;
    font-size: 15px;
}

.period-details i {
    margin-right: 6px;
    color: #9b6cff;
}

.period-dominant {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #27313d;
}

.period-dominant small {
    color: #758292;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.period-dominant strong {
    margin-top: 8px;
    color: #ffffff;
    font-size: 20px;
}

.period-dominant span {
    margin-top: 5px;
    color: #8a96a5;
    font-size: 14px;
}

.stats-section {
    margin-top: 70px;
}

.section-heading {
    margin-bottom: 25px;
}

.section-heading h2 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: 34px;
    letter-spacing: -1px;
}

.section-heading p {
    margin: 7px 0 0;
    color: #7c8999;
    font-size: 16px;
}

.global-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.stat-card {
    min-height: 190px;
    padding: 23px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.stat-card>i {
    color: #9b6cff;
    font-size: 23px;
}

.stat-card>span {
    margin-top: auto;
    color: #8c98a6;
    font-size: 15px;
}

.stat-card>strong {
    margin-top: 7px;
    color: #ffffff;
    font-size: 30px;
}

.stat-card.highlighted {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.17), #101720 70%);
    border-color: rgba(139, 92, 246, 0.35);
}

.global-secondary {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.global-secondary article {
    min-height: 115px;
    padding: 20px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 13px;
}

.global-secondary span {
    color: #8390a0;
    font-size: 14px;
}

.global-secondary strong {
    margin-top: 8px;
    color: #ffffff;
    font-size: 21px;
}

.habits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.habit-card {
    min-height: 220px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.habit-card.purple {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.14), #101720 65%);
    border-color: rgba(139, 92, 246, 0.28);
}

.habit-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 10px;
    color: #9b6cff;
    font-size: 18px;
}

.habit-card>span {
    margin-top: auto;
    color: #8a96a5;
    font-size: 16px;
}

.habit-card>strong {
    margin-top: 7px;
    color: #ffffff;
    font-size: 30px;
}

.habit-card>small {
    margin-top: 8px;
    color: #7e8b9a;
    font-size: 14px;
    line-height: 1.5;
}

.series-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.series-highlights article {
    min-height: 170px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.series-highlights i {
    color: #9b6cff;
    font-size: 21px;
}

.series-highlights span {
    margin-top: auto;
    color: #8390a0;
    font-size: 15px;
}

.series-highlights strong {
    margin-top: 7px;
    color: #ffffff;
    font-size: 22px;
}

.series-highlights small {
    margin-top: 7px;
    color: #9ba6b4;
    font-size: 14px;
}

.series-top-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.series-top-card {
    min-width: 0;
    overflow: hidden;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 15px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.series-top-card:hover {
    transform: translateY(-4px);
    border-color: #8b5cf6;
}

.series-top-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #161f29;
}

.series-top-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.series-top-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667484;
    font-size: 35px;
}

.series-top-position {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 10, 14, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
}

.series-top-content {
    padding: 18px;
}

.series-top-content h3 {
    margin: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 19px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.series-top-main-stat {
    margin-top: 18px;
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.series-top-main-stat strong {
    color: #9b6cff;
    font-size: 30px;
}

.series-top-main-stat span {
    color: #8a96a5;
    font-size: 13px;
}

.series-top-details {
    margin-top: 17px;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    border-top: 1px solid #27313d;
}

.series-top-details div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8995a4;
    font-size: 13px;
}

.series-top-details i {
    width: 15px;
    color: #9b6cff;
}

.actors-featured {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.actor-feature-card {
    position: relative;
    min-width: 0;
    min-height: 360px;
    padding: 28px;
    display: flex;
    align-items: center;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 16px;
    text-align: center;
}

.actor-position {
    position: absolute;
    top: 18px;
    left: 20px;
    color: #9b6cff;
    font-size: 18px;
    font-weight: 900;
}

.actor-photo {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: #18212b;
    border: 1px solid #2a3542;
    border-radius: 50%;
    color: #697687;
    font-size: 32px;
}

.actor-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.actor-feature-card>strong {
    width: 100%;
    margin-top: 22px;
    overflow: hidden;
    color: #ffffff;
    font-size: 24px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.actor-feature-card>span:not(.actor-position) {
    margin-top: 10px;
    color: #95a0ae;
    font-size: 16px;
}

.actor-feature-card small {
    margin-top: 8px;
    color: #798696;
    font-size: 14px;
    line-height: 1.45;
}

.actor-extra-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.actor-extra-grid article {
    min-height: 155px;
    padding: 23px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.actor-extra-grid i {
    color: #9b6cff;
    font-size: 21px;
}

.actor-extra-grid span {
    margin-top: auto;
    color: #8390a0;
    font-size: 15px;
}

.actor-extra-grid strong {
    margin-top: 7px;
    color: #ffffff;
    font-size: 22px;
}

.actor-extra-grid small {
    margin-top: 7px;
    color: #9ba6b4;
    font-size: 14px;
}

.actors-ranking {
    margin-top: 18px;
    overflow: hidden;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.actor-rank-row {
    min-height: 90px;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #27313d;
}

.actor-rank-row:last-child {
    border-bottom: 0;
}

.rank-number {
    width: 38px;
    flex-shrink: 0;
    color: #788596;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
}

.actor-rank-row:nth-child(-n+3) .rank-number {
    color: #9b6cff;
}

.actor-rank-photo {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: #18212b;
    border-radius: 50%;
    color: #697687;
    font-size: 18px;
}

.actor-rank-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.actor-rank-main {
    min-width: 0;
    flex: 1;
}

.actor-rank-main strong {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 18px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.actor-rank-main span {
    display: block;
    margin-top: 6px;
    color: #8491a1;
    font-size: 14px;
}

.rank-value {
    flex-shrink: 0;
    text-align: right;
}

.rank-value strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
}

.rank-value span {
    display: block;
    margin-top: 4px;
    color: #788596;
    font-size: 13px;
}

.stats-double-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.compact-section {
    min-width: 0;
}

.rewatch-grid,
.bingewatch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rewatch-grid article,
.bingewatch-grid article {
    min-height: 165px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.rewatch-grid i {
    color: #9b6cff;
    font-size: 21px;
}

.rewatch-grid strong,
.bingewatch-grid strong {
    margin-top: auto;
    color: #ffffff;
    font-size: 31px;
    line-height: 1.15;
}

.rewatch-grid span,
.bingewatch-grid span {
    margin-top: 8px;
    color: #8995a4;
    font-size: 15px;
}

.bingewatch-grid article>span:first-child {
    margin-top: 0;
    color: #8995a4;
    font-size: 15px;
}

.binge-dominant {
    margin-top: 14px;
    min-height: 100px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.24);
    border-radius: 13px;
}

.binge-dominant>i {
    flex-shrink: 0;
    color: #9b6cff;
    font-size: 24px;
}

.binge-dominant>div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.binge-dominant span {
    color: #8b97a6;
    font-size: 14px;
}

.binge-dominant strong {
    margin-top: 5px;
    overflow: hidden;
    color: #ffffff;
    font-size: 20px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.binge-dominant small {
    flex-shrink: 0;
    color: #b49aff;
    font-size: 15px;
    font-weight: 800;
}

.platform-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.platform-summary-grid article {
    min-width: 0;
    min-height: 170px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.platform-summary-grid i {
    color: #9b6cff;
    font-size: 22px;
}

.platform-summary-grid strong {
    margin-top: auto;
    overflow: hidden;
    color: #ffffff;
    font-size: 27px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.platform-summary-grid span {
    margin-top: 8px;
    color: #8995a4;
    font-size: 15px;
}

.platform-ranking {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.platform-stat-row {
    min-width: 0;
    min-height: 110px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.platform-stat-logo {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: #0a1016;
    border: 1px solid #242f3b;
    border-radius: 12px;
    color: #738091;
    font-size: 22px;
}

.platform-stat-logo img {
    width: 100%;
    height: 100%;
    padding: 10px;
    display: block;
    object-fit: contain;
}

.platform-stat-main {
    min-width: 0;
}

.platform-stat-main strong {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 20px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.platform-stat-main span {
    display: block;
    margin-top: 8px;
    color: #8995a4;
    font-size: 15px;
    line-height: 1.4;
}

.empty-stats {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
    color: #8390a0;
}

.empty-stats i {
    color: #9b6cff;
    font-size: 28px;
}

.empty-stats span {
    font-size: 16px;
}

@media (max-width: 1300px) {
    .series-top-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .platform-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .global-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .series-top-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .habits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats-double-section {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 800px) {
    .stats-container {
        width: calc(100% - 36px);
        padding: 45px 0 70px;
    }
    .period-grid,
    .series-highlights,
    .actors-featured {
        grid-template-columns: 1fr;
    }
    .global-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .series-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .actor-extra-grid {
        grid-template-columns: 1fr;
    }
    .platform-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .platform-ranking {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .stats-container {
        width: calc(100% - 24px);
        padding: 35px 0 55px;
    }
    .stats-hero {
        margin-bottom: 30px;
    }
    .stats-hero h1 {
        font-size: 42px;
    }
    .stats-hero p {
        font-size: 16px;
    }
    .period-card {
        min-height: 300px;
        padding: 22px;
    }
    .global-grid,
    .global-secondary,
    .habits-grid,
    .series-top-grid,
    .platform-summary-grid,
    .rewatch-grid,
    .bingewatch-grid {
        grid-template-columns: 1fr;
    }
    .stat-card,
    .habit-card {
        min-height: 175px;
    }
    .actor-feature-card {
        min-height: 320px;
        padding: 22px;
    }
    .actor-photo {
        width: 130px;
        height: 130px;
    }
    .actor-rank-row {
        min-height: 82px;
        padding: 11px;
        gap: 10px;
    }
    .actor-rank-photo {
        width: 52px;
        height: 52px;
    }
    .actor-rank-main span {
        font-size: 12px;
    }
    .rank-value strong {
        font-size: 18px;
    }
    .rank-value span {
        font-size: 11px;
    }
    .platform-stat-row {
        min-height: 100px;
        padding: 14px;
    }
    .platform-stat-logo {
        width: 64px;
        height: 64px;
    }
}