/* =====================================================================
   Qapsol Template — Core Styles
   Organized: base · header · hero · search panel · platforms ·
   categories · content rows · carousel · card hover · footer · a11y
   Values mirror the live site; structure is clean and tokenized.
   ===================================================================== */

/* ----------------------------------------------------------------- base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    letter-spacing: 0;
    text-align: left;
    background-color: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* --------------------------------------------------------------- header */
#siteHeader {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    width: 100%;
    padding: var(--sp-4);
    background-image: linear-gradient(180deg, rgba(var(--bg-deep), 0.7) 10%, transparent);
    transition: var(--t-base);
}

    #siteHeader.sticky {
        background-color: var(--surface-glass);
        background-image: none;
        backdrop-filter: var(--blur);
        -webkit-backdrop-filter: var(--blur);
        box-shadow: var(--shadow-sticky);
    }

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.header-logo {
    margin-right: var(--sp-2);
}

    .header-logo img {
        height: 25px;
        width: auto;
    }

/* mobile menu button — hidden on tablet/desktop, shown <768 (responsive.css) */
.nav-toggle {
    display: none;
    margin-left: auto;
    padding: var(--sp-1);
    background: none;
    border: 0;
    line-height: 0;
    color: var(--ink);
    cursor: pointer;
}

    .nav-toggle .material-symbols-outlined {
        font-size: 1.9rem;
    }

    .nav-toggle:hover {
        color: var(--accent);
    }

.header-menu {
    display: flex;
    flex: 1;
    align-items: center;
}

.main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

/* push My qaplist + account to the far right on tablet/desktop */
.right-nav {
    margin-left: auto;
}

    .main-nav .nav-link,
    .right-nav a {
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        color: var(--ink-muted);
        white-space: nowrap;
        transition: var(--t-base);
    }

.main-nav .nav-link {
    padding: 0 var(--sp-3);
}

    .main-nav .nav-link:hover,
    .right-nav a:hover {
        color: var(--accent);
    }

.right-nav a {
    padding: 0 var(--sp-2);
}

.right-nav .border-end {
    border-color: var(--border-faint) !important;
    padding-right: var(--sp-3);
    margin-right: var(--sp-3);
}

/* ---- user avatar (self-contained, usable in any header) ---- */
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    background: rgba(229, 8, 21, 0.14);
    color: var(--accent);
    border: 1px solid rgba(229, 8, 21, 0.35);
}

.user-avatar--lg {
    width: 84px;
    height: 84px;
    font-size: 1.7rem;
}

/* ---- header user menu (dropdown) ---- */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.4rem;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--ink-muted);
    border-radius: 999px;
    transition: var(--t-fast);
}

    .user-menu-toggle:hover {
        color: #fff;
    }

    .user-menu-toggle .chev {
        font-size: 1.2rem;
        transition: transform var(--t-fast);
    }

    .user-menu-toggle[aria-expanded="true"] .chev {
        transform: rotate(180deg);
    }

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 50;
    min-width: 230px;
    padding: var(--sp-2);
    background: rgba(13, 14, 20, 0.98);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-card);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

    .user-dropdown[hidden] {
        display: none;
    }

.user-dropdown-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3) var(--sp-3);
    border-bottom: 1px solid var(--border-faint);
    margin-bottom: var(--sp-2);
}

    .user-dropdown-head .nm {
        font-family: var(--font-display);
        font-weight: 700;
        color: #fff;
        font-size: 0.9rem;
    }

    .user-dropdown-head .em {
        color: var(--ink-dim);
        font-size: 0.78rem;
    }

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-card);
    color: var(--ink-muted);
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--t-fast);
}

    .user-dropdown a .material-symbols-outlined {
        font-size: 1.2rem;
    }

    .user-dropdown a:hover {
        background: var(--surface-2);
        color: #fff;
    }

    .user-dropdown a.danger:hover {
        color: var(--accent);
    }

.user-dropdown hr {
    border: 0;
    border-top: 1px solid var(--border-faint);
    margin: var(--sp-2) 0;
}

/* ----------------------------------------------------------------- hero */
.home-featured {
    position: relative;
    width: 100%;
    min-height: 400px;
    padding: 5rem 0 var(--sp-12) 0;
    background-image: linear-gradient(180deg, rgba(var(--bg-deep), 0.35), rgba(var(--bg-deep), 0.85)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center top;
}

    .home-featured h1 {
        margin: 0;
        padding-top: 4rem;
        text-align: center;
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        font-size: var(--fs-h1);
        color: #fff;
    }

    .home-featured h3 {
        margin: var(--sp-2) 0 0 0;
        text-align: center;
        font-weight: 400;
        font-size: var(--fs-subhead);
        color: #fff;
    }

/* --------------------------------------------------------- search panel */
.home-search {
    padding: var(--sp-12) var(--sp-12) 0 var(--sp-12);
    z-index: 2;
}

/* z-index lifts the whole search box (and its floating filter dropdowns)
   above the content rows below (which carry z-index 1 / 10 on hover). */
.search-box {
    position: relative;
    width: 100%;
    z-index: 30;
}

.tab-content {
    width: 100%;
    padding: var(--sp-4) var(--sp-12);
    background-color: var(--surface-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 2px solid var(--border-faint);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow-panel);
}

/* search input */
.search-bar {
    position: relative;
    width: 100%;
    margin: var(--sp-6) 0 var(--sp-4) 0;
}

    .search-bar input {
        width: 100%;
        padding: var(--sp-3) 2.5rem var(--sp-3) var(--sp-4);
        background-color: var(--bg);
        color: var(--ink);
        border: 1px solid var(--border-line);
        border-radius: var(--radius-card);
        font-size: var(--fs-base);
    }

        .search-bar input::placeholder {
            color: var(--ink-muted);
        }

.search-clear {
    position: absolute;
    top: 50%;
    right: var(--sp-3);
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #666;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 .25rem;
}

    .search-clear:hover {
        color: var(--accent);
    }

/* filter facets */
.facets {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    width: 100%;
}

.btn-options {
    flex: 1 1 0;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-3);
    background-color: var(--bg);
    color: var(--ink);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-card);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    cursor: pointer;
    transition: var(--t-fast);
}

    .btn-options:hover {
        color: var(--accent);
    }

    .btn-options.active {
        border-color: var(--accent);
        color: var(--accent);
    }

    .btn-options i {
        padding-left: var(--sp-1);
        margin-left: var(--sp-1);
        border-left: 1px solid var(--border-line);
        font-size: 1.35rem;
    }

    .btn-options.active i {
        color: var(--accent);
        border-color: var(--accent);
    }
    /* rotate only the glyph, not the <i> box (its border-left is the divider) */
    .btn-options i::before {
        display: inline-block;
        transition: transform var(--t-fast);
    }

    .btn-options[aria-expanded="true"] i::before {
        transform: rotate(180deg);
    }

/* selection count badge inside a facet button */
.facet-count {
    margin-left: var(--sp-1);
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

/* ----------------------------------- filter dropdowns (floating, compact) */
.facet {
    position: relative;
    flex: 1 1 0;
    min-width: 120px;
}

    .facet .btn-options {
        width: 100%;
    }

/* floating panel: overlays content, so the search card never resizes */
.facet-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    width: 320px;
    max-width: calc(100vw - 2rem);
    padding: var(--sp-2);
    background: rgba(13, 14, 20, 0.97);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

    .facet-panel[hidden] {
        display: none;
    }

    .facet-panel.align-right {
        left: auto;
        right: 0;
    }

/* two columns, capped height, scrolls beyond */
.facet-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--sp-2);
    max-height: 220px;
    overflow-y: auto;
    padding-right: var(--sp-1);
}

    .facet-options::-webkit-scrollbar {
        width: 7px;
    }

    .facet-options::-webkit-scrollbar-thumb {
        background: rgba(221, 221, 221, 0.25);
        border-radius: 4px;
    }

.facet-opt {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0.3rem 0.25rem;
    color: var(--ink-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
}

    .facet-opt span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .facet-opt:hover {
        color: var(--ink);
        background: rgba(255, 255, 255, 0.05);
    }

    .facet-opt input {
        accent-color: var(--accent);
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
    }

.facet-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--sp-2);
    padding-top: var(--sp-2);
    border-top: 1px solid var(--border-faint);
}

.facet-clear,
.facet-done {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: var(--radius-card);
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    transition: var(--t-fast);
}

.facet-clear {
    background: none;
    border: 0;
    color: var(--ink-muted);
}

    .facet-clear:hover {
        color: var(--accent);
    }

.facet-done {
    background: var(--accent);
    border: 0;
    color: #fff;
}

    .facet-done:hover {
        background: #c20712;
    }

/* ------------------------------------------------------ platform strip */
.platform-hotlink {
    width: 100%;
    padding: var(--sp-2) var(--sp-6) 0 var(--sp-6);
}

    .platform-hotlink ul {
        width: 100%;
        margin: 0;
        padding: 0 0 var(--sp-4) 0;
        list-style: none;
        text-align: center;
        border-bottom: 2px solid var(--border-faint);
        white-space: nowrap;
        overflow-x: auto;
    }

    .platform-hotlink li {
        display: inline-block;
        min-width: 100px;
        min-height: 60px;
        margin-right: var(--sp-2);
    }

.platform-item {
    display: block;
    width: 100px;
    padding-top: 60%;
    background-image: url('../images/platforms/platform-logos.png?102');
    background-size: 1400px;
    background-position-y: 0;
    background-repeat: no-repeat;
    border-radius: var(--radius-card);
    transition: var(--t-base);
}

    .platform-item:hover,
    .platform-item.active {
        background-position-y: 100%;
        box-shadow: 5px 5px 5px rgba(var(--bg-deep), 0.3);
    }

    /* sprite column offsets (sprite = 13 logos across 1300px) */
    .platform-item.exxen {
        background-position-x: -300px;
    }

    .platform-item.gain {
        background-position-x: -500px;
    }

    .platform-item.tvplus {
        background-position-x: -700px;
    }

    .platform-item.tod {
        background-position-x: -800px;
    }

    .platform-item.tabii {
        background-position-x: -900px;
    }

    .platform-item.dsmartgo {
        background-position-x: -1000px;
    }

    .platform-item.prime {
        background-position-x: -400px;
    }

    .platform-item.netflix {
        background-position-x: -200px;
    }

    .platform-item.puhutv {
        background-position-x: 0px;
    }

    .platform-item.disneyplus {
        background-position-x: -1100px;
    }

    .platform-item.hbomax {
        background-position-x: -1200px;
    }

    .platform-item.tivibu {
        background-position-x: -600px;
    }
    .platform-item.mubi {
        background-position-x: -1300px;
    }
/* ----------------------------------------------------- category tabs */
.section-categories {
    position: relative;
    width: 100%;
    overflow-x: auto;
    padding-top: 10px;
}

    .section-categories ul {
        margin: 0;
        padding: 0;
        width: 100%;
        list-style: none;
        text-align: center;
        white-space: nowrap;
    }

    .section-categories li {
        display: inline-block;
        min-width: 150px;
        padding: var(--sp-3) 0;
    }

        .section-categories li a {
            display: block;
            padding: var(--sp-1) var(--sp-6);
            font-family: var(--font-display);
            font-weight: var(--fw-bold);
            font-size: 1rem;
            color: var(--ink);
            border-right: 1px solid var(--border-line);
            transition: var(--t-fast);
        }

        .section-categories li:last-child a {
            border-right: 0;
        }

        .section-categories li a:hover,
        .section-categories li.active a {
            color: var(--accent);
        }

/* --------------------------------------------------------- content rows */
.content-list-container {
    width: 100%;
    padding: 0 var(--gutter);
    position: relative;
    /* Clip the horizontal filmstrip overflow HERE (a tall box), so the
     hover-reveal card — which overflows a single row vertically but stays
     inside this container — remains painted AND hit-testable. */
    overflow-x: clip;
    overflow-y: visible;
}

.content-list {
    position: relative;
    z-index: 1;
    margin-bottom: var(--sp-6);
}
    /* Lift the hovered row above later rows so its expanded card paints on top
   instead of being covered by the next row's posters. */
    .content-list:hover {
        z-index: 10;
    }

.row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
}

    .row-head h2 {
        display: inline-block;
        margin: 7px 0 10px 0;
        padding-left: 10px;
        border-left: 4px solid #fff;
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        font-size: var(--fs-row-title);
        color: var(--ink);
        transition: var(--t-base);
    }

.content-list:hover .row-head h2 {
    color: var(--accent);
    border-color: var(--accent);
}

.row-head .view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink-muted);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    pointer-events: none;
    transition: opacity var(--t-fast), transform var(--t-fast), color var(--t-fast);
}

    .row-head .view-all .material-symbols-outlined {
        font-size: 1.05rem;
    }

    .row-head .view-all:hover {
        color: var(--accent);
    }

.content-list:hover .row-head .view-all,
.content-list:focus-within .row-head .view-all {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
/* touch devices have no hover — keep it visible there */
@media (hover: none) {
    .row-head .view-all {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .row-head .view-all {
        transition: opacity var(--t-fast);
        transform: none;
    }
}
/* ----------------------------------------------------- owl carousel ui */
/* Let the row overflow freely in BOTH axes so the hover-reveal card paints
   and stays hit-testable. The horizontal filmstrip overflow is clipped one
   level up, at .content-list-container (a tall box that doesn't clip the
   card's vertical expansion). */
.content-carousel .owl-stage-outer {
    overflow: visible;
}

.content-carousel .owl-item {
    transition: var(--t-base);
}

/* nav arrows = gradient fade chevrons */
.content-carousel .owl-nav {
    margin: 0;
}

    .content-carousel .owl-nav [class*='owl-'] {
        position: absolute;
        top: 0;
        bottom: 0;
        margin: 0;
        padding: 0 var(--sp-2);
        background: transparent;
        color: var(--ink-muted);
        border-radius: 0;
    }

    .content-carousel .owl-nav .owl-next {
        right: calc(-1 * var(--gutter));
        border-radius: var(--radius-card) 0 0 var(--radius-card);
        background-image: linear-gradient(90deg, transparent, rgba(var(--bg-deep), 1) 60%);
    }

    .content-carousel .owl-nav .owl-prev {
        left: calc(-1 * var(--gutter));
        border-radius: 0 var(--radius-card) var(--radius-card) 0;
        background-image: linear-gradient(90deg, rgba(var(--bg-deep), 1) 40%, transparent);
    }

    .content-carousel .owl-nav [class*='owl-']:hover {
        background-color: transparent;
        color: #fff;
    }

    .content-carousel .owl-nav [class*='owl-'].disabled {
        display: none;
    }

    .content-carousel .owl-nav span {
        font-size: 3rem;
        line-height: 1;
    }

/* dots = thin bars, top-right, max 5 */
.content-carousel .owl-dots {
    position: absolute;
    top: -25px;
    right: 0;
}

    .content-carousel .owl-dots .owl-dot span {
        width: 15px;
        height: 3px;
        margin: 10px 2px;
        background: var(--ink-dim);
        border-radius: 0;
    }

    .content-carousel .owl-dots .owl-dot.active span {
        background: var(--ink);
    }

    .content-carousel .owl-dots .owl-dot:nth-child(n + 6) {
        display: none;
    }

/* ----------------------------------------------------- cards + hover */
.content-item {
    position: relative;
}

    .content-item .poster img {
        width: 100%;
        height: auto; /* override the width/height attrs so aspect-ratio governs */
        border-radius: var(--radius-card);
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    /* hover-reveal detail overlay (Netflix-style expand) */
    .content-item .active-view {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 6;
        opacity: 0;
        pointer-events: none;
        transform: scale(0.98);
        transform-origin: center top;
        background-color: rgba(var(--bg-deep), 0.96);
        backdrop-filter: var(--blur);
        -webkit-backdrop-filter: var(--blur);
        border-radius: var(--radius-card);
        box-shadow: 5px 5px 15px rgba(var(--bg-deep), 0.6);
        overflow: hidden;
        transition: var(--t-reveal);
    }

    .content-item:hover .active-view {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1.12);
    }

.active-view .poster img {
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.active-view .details {
    padding: var(--sp-2) var(--sp-4) var(--sp-3);
}

    .active-view .details .title h3 {
        margin: var(--sp-2) 0 0 0;
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        font-size: 1rem;
        color: #fff;
        padding-top: var(--sp-1);
    }

    .active-view .details .title h6 {
        margin: 2px 0 0 0;
        font-weight: 400;
        font-size: 0.8rem;
        color: var(--ink-muted);
    }

    .active-view .details p {
        margin: var(--sp-2) 0 var(--sp-2) 0;
        font-size: 0.78rem;
        color: var(--ink-muted);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .active-view .details .actions a {
        display: inline-flex;
        color: var(--ink-muted);
        font-size: 1.5rem;
        margin-right: var(--sp-2);
        transition: var(--t-fast);
    }

        .active-view .details .actions a:first-child {
            color: #fff;
        }

        .active-view .details .actions a:hover {
            color: var(--accent);
        }
/* ----------------------------------------------------- Top 10 row */
/* platform tab bar (each platform has its own Top 10) */
.top10-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--sp-2);
    overflow-x: auto;
    scrollbar-width: none;
    /* pull left so the first pill's label lines up with the heading */
    margin: 0 0 var(--sp-5) -0.85rem;
    padding: var(--sp-1) 0;
}

    .top10-tabs::-webkit-scrollbar {
        display: none;
    }

    .top10-tabs a {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        padding: 0.42rem 0.85rem;
        border-radius: 999px;
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        font-size: 0.8rem;
        letter-spacing: 0.01em;
        line-height: 1;
        white-space: nowrap;
        color: var(--ink-muted);
        background-color: transparent;
        cursor: pointer;
        transition: color var(--t-fast), background-color var(--t-fast);
    }

        .top10-tabs a:hover {
            color: #fff;
            background-color: var(--surface-2);
        }

        .top10-tabs a.active {
            color: #fff;
            background-color: var(--accent);
        }

        .top10-tabs a:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

/* item: giant outlined rank + portrait poster side by side */
.top10-item {
    position: relative;
}
/* giant outlined rank, sitting BEHIND the poster. Anchored by its LEFT edge to
   the item's left edge so a rank can only grow rightward INTO ITS OWN poster —
   never backward into the previous item. All ranks share one font-size and one
   bottom line, so they read as identical size on a single baseline. */
.top10-rank {
    position: absolute;
    left: 0;
    bottom: 0.05em;
    z-index: 1;
    white-space: nowrap;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(5.5rem, 12vw, 12rem);
    line-height: 0.8;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
    pointer-events: none;
    user-select: none;
}
    /* two-digit rank (10): condensed so both digits stay readable in the trough */
    .top10-rank.is-wide {
        letter-spacing: -0.16em;
    }

.top10-pw {
    position: relative;
    z-index: 2; /* poster paints over the rank's right side */
    width: 76%;
    margin-left: auto; /* poster hugs the right; rank sits at bottom-left */
}
/* portrait poster — overrides the 16/9 card ratio (appended later = wins) */
.top10-item .poster img {
    aspect-ratio: 2 / 3;
}
/* keep the hover-reveal preview portrait too */
.top10-item .active-view .poster img {
    aspect-ratio: 2 / 3;
}

@media (max-width: 600px) {
    .top10-rank {
        font-size: clamp(4rem, 17vw, 7rem);
        -webkit-text-stroke-width: 1.5px;
    }

    .top10-pw {
        width: 78%;
    }
}
/* ----------------------------------------------------- content modal */
.content-modal .modal-content {
    background-color: var(--bg);
    color: var(--ink);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-panel);
    overflow: hidden;
}

.content-modal .modal-body {
    padding: 0;
}

.cm-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    cursor: pointer;
    transition: var(--t-fast);
}

    .cm-close:hover {
        background: var(--accent);
    }

/* backdrop / hero */
.cm-hero {
    position: relative;
    width: 100%;
}

.cm-backdrop {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 58vh;
    object-fit: cover;
    display: block;
}

.cm-film {
    position: absolute;
    inset: 0 0 auto 0;
    height: 34px;
    z-index: 3;
    background: repeating-linear-gradient(90deg, #0a0a0a 0 30px, transparent 30px 56px);
}

.cm-hero-fade {
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    z-index: 2;
    background: linear-gradient(to top, var(--bg) 6%, rgba(17, 17, 17, 0.4) 60%, transparent);
}

/* details */
.cm-details {
    position: relative;
    z-index: 4;
    margin-top: -96px;
    padding: 0 2.5rem 2rem;
}

.cm-title {
    margin: 0 0 0.75rem;
    padding-left: 12px;
    border-left: 5px solid var(--accent);
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 2rem;
    color: #fff;
}

.cm-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 0.95rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

    .cm-meta span {
        padding: 0 1rem;
        border-right: 1px solid var(--ink-muted);
    }

        .cm-meta span:first-child {
            padding-left: 0;
        }

        .cm-meta span:last-child {
            border-right: 0;
        }

.cm-desc {
    max-width: 70ch;
    color: var(--ink-muted);
    margin-bottom: 1.75rem;
}

/* platform availability panel */
.cm-platform {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-faint);
    border-radius: 8px;
}

.cm-platform-logo {
    flex: 0 0 auto;
    width: 100px;
    height: 60px;
    padding-top: 0; /* override .platform-item's percentage padding */
    cursor: default;
}

    .cm-platform-logo:hover {
        background-position-y: 0;
        box-shadow: none;
    }

.cm-platform-info {
    flex: 1 1 auto;
    min-width: 0;
}

    .cm-platform-info h4 {
        margin: 0 0 0.15rem;
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        font-size: 1.15rem;
        color: #fff;
    }

    .cm-platform-info p {
        margin: 0;
        font-size: 0.9rem;
        color: var(--ink-muted);
    }

        .cm-platform-info p.muted {
            font-size: 0.82rem;
            color: var(--ink-dim);
        }

.btn-watch {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem 1.4rem;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    border-radius: 6px;
    transition: var(--t-fast);
}

    .btn-watch:hover {
        background: #c20712;
        color: #fff;
    }

    .btn-watch .material-symbols-outlined {
        font-size: 1.2rem;
    }

/* episodes */
.cm-episodes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

    .cm-episodes-head h2,
    .cm-episodes-head h3 {
        margin: 0;
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        font-size: 1.5rem;
        color: #fff;
    }

.cm-season {
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--border-line);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
}

.cm-episodes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-episode {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-faint);
}

    .cm-episode:last-child {
        border-bottom: 0;
    }

.cm-ep-thumb {
    flex: 0 0 150px;
    width: 150px;
    height: auto; /* override the width/height attrs so aspect-ratio governs */
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 5px;
}

.cm-ep-body {
    flex: 1 1 auto;
    min-width: 0;
}

.cm-ep-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

    .cm-ep-head h3,
    .cm-ep-head h4 {
        margin: 0;
        font-family: var(--font-display);
        font-weight: var(--fw-bold);
        font-size: 1.1rem;
        color: #fff;
    }

.cm-ep-dur {
    color: var(--ink-muted);
    font-weight: 600;
    white-space: nowrap;
}

.cm-episode p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink-muted);
}

/* poster cards become clickable */
.content-item .poster {
    cursor: pointer;
}

/* ----------------------------------------------------------------- footer */
.site-footer {
    margin-top: var(--sp-12);
    padding: var(--sp-12) var(--gutter) var(--sp-6);
    border-top: 1px solid var(--border-faint);
    background-color: rgba(var(--bg-deep), 0.6);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-6);
    justify-content: space-between;
}

.footer-logo img {
    height: 24px;
    width: auto;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-6);
    list-style: none;
    margin: 0;
    padding: 0;
}

    .footer-nav a {
        font-family: var(--font-display);
        font-weight: 600;
        color: var(--ink-muted);
        transition: var(--t-fast);
    }

        .footer-nav a:hover {
            color: var(--accent);
        }

.footer-bottom {
    margin-top: var(--sp-6);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-faint);
    color: var(--ink-dim);
    font-size: 0.8rem;
}

    .footer-bottom p {
        margin: 0;
    }

/* ----------------------------------------------------- accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.platform-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .content-item:hover .active-view {
        transform: none;
    }
}
/* ----------------------------------------------------- App Modal */
.app-modal .modal-content {
    background: rgba(17, 18, 24, 0.98);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    color: var(--ink);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-panel);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.app-modal .modal-header {
    border-bottom: 1px solid var(--border-faint);
    padding: var(--sp-4) var(--sp-5);
}

.app-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
}

    .app-modal .modal-title .material-symbols-outlined {
        color: var(--accent);
        font-size: 1.3rem;
    }

.app-modal .modal-body {
    padding: var(--sp-4) var(--sp-5);
}

.app-modal .modal-footer {
    border-top: 1px solid var(--border-faint);
    padding: var(--sp-3) var(--sp-5);
}
/* ----------------------------------------------------- Country/Language Picker */
.picker-search {
    position: relative;
    margin-bottom: var(--sp-3);
}

    .picker-search .material-symbols-outlined {
        position: absolute;
        left: 0.7rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--ink-dim);
        font-size: 1.2rem;
        pointer-events: none;
    }

    .picker-search input {
        width: 100%;
        padding: 0.6rem 0.8rem 0.6rem 2.35rem;
        background: var(--surface);
        border: 1px solid var(--border-faint);
        border-radius: var(--radius-card);
        color: var(--ink);
        font-size: 0.9rem;
    }

        .picker-search input::placeholder {
            color: var(--ink-dim);
        }

        .picker-search input:focus {
            outline: none;
            border-color: var(--accent);
            background: var(--surface-2);
        }

.picker-list {
    max-height: 46vh;
    overflow-y: auto;
    margin: 0 calc(var(--sp-2) * -1);
    padding: 0 var(--sp-2);
}

    .picker-list::-webkit-scrollbar {
        width: 8px;
    }

    .picker-list::-webkit-scrollbar-thumb {
        background: var(--surface-2);
        border-radius: 999px;
    }

.picker-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    min-height: 44px;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--ink-muted);
    font-size: 0.9rem;
    border-radius: var(--radius-card);
    transition: var(--t-fast);
}

    .picker-item:hover {
        background: var(--surface-2);
        color: #fff;
    }

    .picker-item .pk-name {
        font-weight: 500;
    }

    .picker-item .pk-sub {
        color: var(--ink-dim);
        font-size: 0.8rem;
        margin-left: 0.45rem;
    }

    .picker-item .check {
        margin-left: auto;
        color: var(--accent);
        font-size: 1.25rem;
        opacity: 0;
    }

    .picker-item.is-selected {
        color: #fff;
    }

        .picker-item.is-selected .check {
            opacity: 1;
        }

.picker-empty {
    display: none;
    padding: var(--sp-5);
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.85rem;
}

.fi {
    width: 1.5rem;
    height: 1.12rem;
    border-radius: 2px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}
/* ----------------------------------------------------- User Menu subitems */
.user-dropdown a.um-pick {
    gap: 0.6rem;
}

.um-pick .um-pick-v {
    margin-left: auto;
    color: var(--ink-dim);
    font-weight: 500;
    font-size: 0.8rem;
}

.um-pick .fi {
    margin-left: auto;
}

    .um-pick .fi + .um-pick-v {
        margin-left: 0.5rem;
    }

/* ----------------------------------------------------- Cookie Bar */
.cookie-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040; /* above content, below Bootstrap modals (1055) */
    background: rgba(13, 14, 20, 0.94);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-top: 1px solid var(--border-faint);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
    animation: cookie-rise 0.4s ease-out;
}

    .cookie-bar[hidden] {
        display: none;
    }

@keyframes cookie-rise {
    from {
        transform: translateY(100%);
    }

    to {
        transform: none;
    }
}

.cookie-bar-inner {
    max-width: 1320px;
    margin-inline: auto;
    padding: var(--sp-3) var(--gutter);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1 1 320px;
    min-width: 0;
    color: var(--ink-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

    .cookie-text strong {
        color: #fff;
        font-family: var(--font-display);
        font-weight: 700;
    }

    .cookie-text a {
        color: var(--accent);
        text-decoration: underline;
    }

.cookie-actions {
    display: flex;
    gap: var(--sp-2);
    flex: 0 0 auto;
}

.cookie-btn {
    padding: 0.5rem 1.15rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--t-fast);
}

.cookie-btn--accept {
    background: var(--accent);
    color: #fff;
}

    .cookie-btn--accept:hover {
        filter: brightness(1.08);
    }

.cookie-btn--decline {
    background: transparent;
    color: var(--ink-muted);
    border-color: var(--border-faint);
}

    .cookie-btn--decline:hover {
        background: var(--surface-2);
        color: #fff;
    }

@media (max-width: 600px) {
    .cookie-bar-inner {
        padding: var(--sp-3) var(--sp-4);
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-bar {
        animation: none;
    }
}
