.bingewatch-page {
    width: 100%;
}

.bingewatch-container {
    width: calc(100% - 48px);
    max-width: 1900px;
    margin: 0 auto;
    padding: 55px 0 90px;
}

.bingewatch-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.bingewatch-eyebrow {
    display: block;
    color: #9b6cff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.bingewatch-heading h1 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(45px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -2.4px;
}

.bingewatch-heading p {
    margin: 12px 0 0;
    color: #8290a0;
    font-size: 17px;
}

.history-top-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #ffffff;
    font-family: inherit;
    font-weight: 800;
    text-decoration: none;
}

.history-top-button {
    min-height: 48px;
    padding: 0 17px;
    background: #101720;
    border: 1px solid #2a3542;
    border-radius: 9px;
    font-size: 14px;
}

.history-top-button:hover {
    border-color: #8b5cf6;
}

.main-stats-grid {
    margin-top: 35px;
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.main-stat-card {
    position: relative;
    min-height: 205px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
    overflow: hidden;
}

.main-stat-card::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -55px;
    width: 130px;
    height: 130px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 50%;
    filter: blur(4px);
}

.main-stat-highlight {
    background: linear-gradient( 145deg, rgba(139, 92, 246, 0.14), #101720 60%);
    border-color: rgba(139, 92, 246, 0.35);
}

.main-stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    color: #9b6cff;
    font-size: 18px;
}

.main-stat-card>span {
    margin-top: auto;
    color: #8794a4;
    font-size: 15px;
}

.main-stat-card>strong {
    position: relative;
    z-index: 1;
    margin-top: 7px;
    color: #ffffff;
    font-size: clamp(29px, 2.3vw, 39px);
    line-height: 1;
}

.secondary-stats-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat( 5, minmax(0, 1fr));
    gap: 15px;
}

.secondary-stats-grid article {
    min-height: 105px;
    padding: 17px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0e151d;
    border: 1px solid #25303c;
    border-radius: 11px;
}

.secondary-stats-grid span {
    color: #7f8c9c;
    font-size: 13px;
}

.secondary-stats-grid strong {
    margin-top: 6px;
    color: #ffffff;
    font-size: 23px;
}

.secondary-stats-grid small {
    margin-top: 2px;
    color: #697687;
    font-size: 11px;
}

.bingewatch-section {
    margin-top: 75px;
}

.section-heading {
    margin-bottom: 25px;
}

.section-heading-inline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.section-heading h2 {
    margin: 7px 0 0;
    color: #ffffff;
    font-size: 35px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat( 4, minmax(0, 1fr));
    gap: 15px;
}

.record-card {
    min-width: 0;
    min-height: 250px;
    padding: 23px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.record-card-top {
    display: flex;
    align-items: center;
    gap: 11px;
}

.record-card-top>span {
    color: #a3adba;
    font-size: 14px;
    font-weight: 800;
}

.record-icon {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 9px;
    color: #9b6cff;
    font-size: 15px;
}

.record-date {
    margin-top: 23px;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.25;
}

.record-series {
    margin-top: 8px;
    color: #8491a1;
    font-size: 14px;
    line-height: 1.5;
}

.record-bottom {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.record-bottom span {
    padding: 8px 10px;
    background: #0a1016;
    border: 1px solid #25303c;
    border-radius: 7px;
    color: #bec6d0;
    font-size: 13px;
    font-weight: 700;
}

.record-bottom i {
    margin-right: 4px;
    color: #9b6cff;
}

.badge-summary {
    padding: 13px 16px;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0 8px;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 10px;
}

.badge-summary strong {
    grid-row: span 2;
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 25px;
}

.badge-summary span {
    color: #909cab;
    font-size: 12px;
}

.badge-summary small {
    color: #687687;
    font-size: 10px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(285px, 1fr));
    gap: 11px;
}

.binge-badge {
    --badge-color: #9ca3af;
    position: relative;
    min-width: 0;
    min-height: 90px;
    padding: 14px 48px 14px 14px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    overflow: hidden;
    background: linear-gradient( 135deg, color-mix( in srgb, var(--badge-color) 9%, #101720), #101720 70%);
    border: 1px solid color-mix( in srgb, var(--badge-color) 38%, #26313f);
    border-radius: 11px;
}

.binge-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--badge-color);
}

.binge-badge>.badge-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix( in srgb, var(--badge-color) 12%, transparent);
    border-radius: 9px;
    font-size: 20px;
}

.badge-content {
    min-width: 0;
}

.badge-content strong {
    display: block;
    color: var(--badge-color);
    font-size: 14px;
}

.badge-content span {
    margin-top: 3px;
    display: block;
    overflow: hidden;
    color: #7f8c9c;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.badge-count,
.badge-lock {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
}

.badge-count {
    padding: 5px 7px;
    background: color-mix( in srgb, var(--badge-color) 13%, #0a1016);
    border-radius: 6px;
    color: var(--badge-color);
    font-size: 11px;
    font-weight: 900;
}

.badge-lock {
    color: #555f6b;
    font-size: 12px;
}

.binge-badge.locked {
    --badge-color: #58616c;
    opacity: 0.5;
    filter: grayscale(1);
}

.badge-common {
    --badge-color: #c4c7ce;
}

.badge-rare {
    --badge-color: #46cf92;
}

.badge-epic {
    --badge-color: #59a5ff;
}

.badge-legendary {
    --badge-color: #af70ff;
}

.badge-mythic {
    --badge-color: #ff8a57;
}

.badge-unique {
    --badge-color: #f14e69;
}

.badges-legend {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
}

.badges-legend span {
    position: relative;
    padding-left: 15px;
    color: #8491a1;
    font-size: 11px;
    font-weight: 700;
}

.badges-legend span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 9px;
    height: 9px;
    transform: translateY(-50%);
    border-radius: 50%;
}

.rarity-common::before {
    background: #c4c7ce;
}

.rarity-rare::before {
    background: #46cf92;
}

.rarity-epic::before {
    background: #59a5ff;
}

.rarity-legendary::before {
    background: #af70ff;
}

.rarity-mythic::before {
    background: #ff8a57;
}

.rarity-unique::before {
    background: #f14e69;
}

.section-link {
    color: #9b6cff;
    font-size: 13px;
}

.section-link:hover {
    color: #b79aff;
}

.top-binges-grid {
    display: grid;
    grid-template-columns: repeat( 5, minmax(0, 1fr));
    gap: 15px;
}

.top-binge-card,
.top-serie-card {
    min-width: 0;
    overflow: hidden;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.top-binge-card:hover,
.top-serie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.55);
}

.top-binge-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 2.4;
    overflow: hidden;
    background: #080d12;
}

.top-binge-poster img,
.top-serie-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.top-binge-overlay {
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient( to top, rgba(16, 23, 32, 1), rgba(16, 23, 32, 0));
}

.top-position {
    position: absolute;
    z-index: 3;
    top: 11px;
    left: 11px;
    min-width: 35px;
    height: 35px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 17, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(5px);
}

.top-binge-main-stat {
    position: absolute;
    z-index: 3;
    right: 15px;
    bottom: 13px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.top-binge-main-stat strong {
    color: #ffffff;
    font-size: 30px;
}

.top-binge-main-stat span {
    color: #9aa5b2;
    font-size: 11px;
}

.top-binge-content {
    padding: 17px;
}

.top-binge-content h3,
.top-serie-content h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.25;
}

.top-binge-series {
    margin: 7px 0 0;
    overflow: hidden;
    color: #778596;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.top-binge-date {
    margin-top: 11px;
    color: #8390a0;
    font-size: 12px;
}

.top-binge-date i {
    margin-right: 4px;
    color: #9b6cff;
}

.top-binge-footer {
    margin-top: 16px;
    padding-top: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #27313d;
}

.top-binge-footer span {
    color: #c5ccd5;
    font-size: 13px;
    font-weight: 800;
}

.top-binge-footer i {
    margin-right: 4px;
    color: #9b6cff;
}

.top-series-grid {
    display: grid;
    grid-template-columns: repeat( 5, minmax(0, 1fr));
    gap: 15px;
}

.top-serie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 2.55;
    overflow: hidden;
    background: #080d12;
}

.top-serie-content {
    padding: 18px;
}

.top-serie-content>strong {
    margin-top: 9px;
    display: block;
    color: #a98aff;
    font-size: 15px;
}

.top-serie-stats {
    margin-top: 16px;
    padding-top: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #27313d;
}

.top-serie-stats span {
    color: #8a97a7;
    font-size: 12px;
}

.top-serie-stats i {
    margin-right: 4px;
    color: #9b6cff;
}

.history-callout {
    margin-top: 75px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: linear-gradient( 120deg, rgba(139, 92, 246, 0.15), #101720 55%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
}

.history-callout h2 {
    margin: 7px 0 0;
    color: #ffffff;
    font-size: 30px;
}

.history-callout p {
    max-width: 800px;
    margin: 9px 0 0;
    color: #8794a4;
    font-size: 14px;
    line-height: 1.6;
}

.history-callout>a {
    min-height: 50px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 8px;
    background: #8b5cf6;
    border-radius: 9px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 1450px) {
    .secondary-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .top-binges-grid,
    .top-series-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1150px) {
    .records-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .top-binges-grid,
    .top-series-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .bingewatch-container {
        width: calc(100% - 30px);
        padding: 40px 0 65px;
    }
    .bingewatch-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .section-heading-inline {
        align-items: flex-start;
        flex-direction: column;
    }
    .secondary-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .top-binges-grid,
    .top-series-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .history-callout {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .bingewatch-container {
        width: calc(100% - 22px);
    }
    .bingewatch-heading h1 {
        font-size: 42px;
    }
    .history-top-button {
        width: 100%;
    }
    .main-stats-grid,
    .records-grid,
    .secondary-stats-grid,
    .top-binges-grid,
    .top-series-grid {
        grid-template-columns: 1fr;
    }
    .main-stat-card {
        min-height: 170px;
    }
    .badges-grid {
        grid-template-columns: 1fr;
    }
    .section-heading h2 {
        font-size: 29px;
    }
    .badge-summary {
        width: 100%;
    }
    .history-callout {
        padding: 23px;
    }
    .history-callout>a {
        width: 100%;
    }
}