/* ==========================================================================
   VidStream — Netflix-Exact Design System
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --nf-black: #141414;
    --nf-dark: #181818;
    --nf-surface: #1a1a1a;
    --nf-elevated: #232323;
    --nf-card: #2f2f2f;
    --nf-red: #e50914;
    --nf-red-hover: #f6121d;
    --nf-white: #e5e5e5;
    --nf-gray: #808080;
    --nf-gray-light: #b3b3b3;
    --nf-gray-dark: #333;
    --nf-font: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --nf-radius: 4px;
    --nf-radius-lg: 6px;
    --nf-transition: 0.2s ease;
    --nf-shadow: 0 3px 10px rgba(0,0,0,.75);
    --nf-shadow-lg: 0 8px 40px rgba(0,0,0,.9);
    --nf-header-h: 68px;
    --nf-row-padding: 4%;
}

/* ---------- Netflix Sans (@font-face from /Fs) ---------- */
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-Th.ttf') format('truetype'); font-weight: 100; font-style: normal; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-Lt.ttf') format('truetype'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-Rg.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-Md.ttf') format('truetype'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-Bd.ttf') format('truetype'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-Blk.ttf') format('truetype'); font-weight: 900; font-style: normal; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-ThIt.ttf') format('truetype'); font-weight: 100; font-style: italic; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-LtIt.ttf') format('truetype'); font-weight: 300; font-style: italic; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-It.ttf') format('truetype'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-MdIt.ttf') format('truetype'); font-weight: 500; font-style: italic; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-BdIt.ttf') format('truetype'); font-weight: 700; font-style: italic; }
@font-face { font-family: 'Netflix Sans'; src: url('/Fs/NetflixSans-BlkIt.ttf') format('truetype'); font-weight: 900; font-style: italic; }

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--nf-font);
    background: var(--nf-black);
    color: var(--nf-white);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ---------- Loading Screen ---------- */
.nf-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--nf-black);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.nf-loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.nf-loading-logo {
    height: 120px;
    animation: nfPulse 1.5s infinite alternate ease-in-out;
}

@media (max-width: 768px) {
    .nf-loading-logo { height: 80px; }
}

@keyframes nfPulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

/* ---------- Netflix-Style Intro ---------- */
.nf-intro {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
    visibility: hidden;
}

/* Covers the screen the moment the loading logo starts fading out, so the
   homepage never peeks through before the N intro begins. */
.nf-intro.ready {
    visibility: visible;
}

.nf-intro.play {
    visibility: visible;
}

.nf-intro__stage {
    position: relative;
    width: 300px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nf-intro__n {
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: contain;
    transform-origin: center center;
    opacity: 0;
    animation: nfIntroN 4.2s cubic-bezier(0.25, 0.5, 0.3, 1) forwards;
    animation-play-state: paused;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0) scale(0.3);
}

.nf-intro__glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 420px;
    height: 420px;
    transform: translate(-50%, -50%) scale(0.6);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(105, 110, 240, 0.5) 0%, rgba(105, 110, 240, 0.14) 45%, transparent 70%);
    animation: nfIntroGlow 4.2s ease forwards;
    animation-play-state: paused;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.nf-intro__wordmark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1.3);
    width: 520px;
    max-width: 60vw;
    height: auto;
    object-fit: contain;
    opacity: 0;
    animation: nfIntroWordmark 4.2s ease forwards;
    animation-play-state: paused;
    will-change: transform, opacity;
}

.nf-intro.hide {
    animation: nfIntroOut 0.7s ease forwards;
}

.nf-intro.play .nf-intro__n,
.nf-intro.play .nf-intro__glow,
.nf-intro.play .nf-intro__wordmark {
    animation-play-state: running;
}

/* Single smooth N timeline: appears → zooms in → holds steady → fades out.
   No second zoom-in during the exit, so it can't read as a double motion. */
@keyframes nfIntroN {
    0%   { transform: scale(0.3); opacity: 0; }
    10%  { transform: scale(1.06); opacity: 1; }
    22%  { transform: scale(1.0); opacity: 1; }
    60%  { transform: scale(1.0); opacity: 1; }
    68%  { transform: scale(1.0); opacity: 0; }
    100% { transform: scale(1.0); opacity: 0; }
}

/* Glow swells in with the N, dims during the hold, then flares once behind
   the wordmark — single smooth pulse, no flickering. */
@keyframes nfIntroGlow {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    8%   { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    18%  { opacity: 0.6; transform: translate(-50%, -50%) scale(1.02); }
    55%  { opacity: 0.55; transform: translate(-50%, -50%) scale(1.02); }
    66%  { opacity: 0.85; transform: translate(-50%, -50%) scale(1.08); }
    72%  { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

/* netflix.png fades in as the N fades out (crossfade), holds, then fades out */
@keyframes nfIntroWordmark {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
    62%  { opacity: 0; transform: translate(-50%, -50%) scale(1.12); }
    70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    92%  { opacity: 0; transform: translate(-50%, -50%) scale(1.02); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.02); }
}

@keyframes nfIntroOut {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@media (max-width: 768px) {
    .nf-intro__stage {
        width: 200px;
        height: 228px;
    }
    .nf-intro__n {
        max-height: 228px;
    }
    .nf-intro__glow { width: 280px; height: 280px; }
    .nf-intro__wordmark { width: 300px; }
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }

/* ==========================================================================
   Header / Navbar
   ========================================================================== */
.nf-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nf-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--nf-row-padding);
    background: linear-gradient(180deg, rgba(0,0,0,.75) 10%, rgba(0,0,0,.3) 50%, transparent);
    transition: background 0.45s ease;
}

.nf-header.scrolled {
    background: rgba(20, 20, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.nf-header__left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.nf-header__center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nf-logo {
    height: 45px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nf-logo:hover {
    transform: scale(1.05);
}

@media (min-width: 1100px) {
    .nf-logo { height: 55px; }
}

.nf-nav {
    display: none;
    gap: 18px;
}

@media (min-width: 885px) {
    .nf-nav { display: flex; }
}

.nf-nav__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--nf-gray-light);
    transition: all var(--nf-transition);
    white-space: nowrap;
    padding: 6px 16px;
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.nf-nav__link:hover,
.nf-nav__link.active {
    color: #fff;
}

.nf-nav__link.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.nf-header__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

/* Header icon button (QR, etc.) */
.nf-header__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nf-header__icon-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .nf-header__icon-btn {
        display: none;
    }
}

/* Standalone search icon in new design */
.nf-search-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #fff;
    margin-right: 10px;
}

/* Search bar */
.nf-search {
    display: flex;
    align-items: center;
    position: relative;
}

.nf-search__icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #fff;
    z-index: 2;
    transition: transform var(--nf-transition);
}

.nf-search__input {
    width: 0;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-family: var(--nf-font);
    outline: none;
    transition: all 0.3s ease;
}

.nf-search.open .nf-search__input {
    width: 250px;
    padding: 7px 12px 7px 36px;
    border-color: #fff;
    background: rgba(0,0,0,.85);
}

.nf-search.open .nf-search__icon {
    position: absolute;
    left: 8px;
}

@media (max-width: 884px) {
    .nf-search { display: none; }
}

/* Notification bell */
.nf-notif-btn {
    position: relative;
    color: #fff;
}

.nf-notif-btn svg { width: 24px; height: 24px; }

/* Profile avatar */
.nf-profile {
    position: relative;
    flex-shrink: 0;
}

.nf-profile__avatar {
    width: 32px;
    height: 32px;
    max-width: none;
    flex: none;
    border-radius: var(--nf-radius);
    cursor: pointer;
    transition: outline var(--nf-transition);
}

.nf-profile__caret {
    width: 16px; height: 16px;
    margin-left: -2px;
    transition: transform var(--nf-transition);
    color: #fff;
}

.nf-profile:hover .nf-profile__caret {
    transform: rotate(180deg);
}

/* Profile dropdown */
.nf-profile__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    background: rgba(20,20,20,.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--nf-radius);
    padding: 10px 0;
    display: none;
    z-index: 200;
    box-shadow: var(--nf-shadow-lg);
    animation: nfDropdownIn 0.25s ease;
    left: 0;
    right: auto;
}

@media (max-width: 768px) {
    .nf-profile__dropdown {
        position: fixed;
        top: var(--nf-header-h);
        left: var(--nf-row-padding);
        right: auto;
        width: 200px;
    }
}

@keyframes nfDropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nf-profile:hover .nf-profile__dropdown,
.nf-profile:focus-within .nf-profile__dropdown {
    display: block;
}

.nf-profile__dropdown::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 20px;
    border: 7px solid transparent;
    border-bottom-color: rgba(255,255,255,.9);
}

.nf-profile__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--nf-gray-light);
    transition: background var(--nf-transition);
    cursor: pointer;
}

.nf-profile__dropdown-item:hover {
    text-decoration: underline;
}

.nf-profile__dropdown-item img {
    width: 32px; height: 32px; border-radius: var(--nf-radius);
}

.nf-profile__dropdown-divider {
    border-top: 1px solid rgba(255,255,255,.15);
    margin: 6px 0;
}

/* Mobile menu button */
.nf-mobile-menu-btn {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 14px;
    gap: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

@media (min-width: 885px) {
    .nf-mobile-menu-btn { display: none; }
}

.nf-mobile-nav {
    display: none;
    position: fixed;
    top: var(--nf-header-h);
    left: 0;
    right: 0;
    background: rgba(0,0,0,.93);
    border-bottom: 1px solid rgba(255,255,255,.1);
    z-index: 99;
    padding: 15px var(--nf-row-padding);
}

.nf-mobile-nav.active {
    display: block;
}

.nf-mobile-nav a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    color: var(--nf-gray-light);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.nf-mobile-nav a:hover,
.nf-mobile-nav a.active { color: #fff; }

/* Mobile header/nav polish ------------------------------------------------- */
@media (max-width: 884px) {
    .nf-header {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--nf-header-h) + env(safe-area-inset-top));
        background: linear-gradient(180deg, rgba(0,0,0,.9) 40%, rgba(0,0,0,.5) 70%, transparent);
        padding-left: 3%;
        padding-right: 3%;
    }
    .nf-header.scrolled {
        background: rgba(20, 20, 20, 0.98);
    }
    .nf-logo {
        height: 34px;
    }
    .nf-mobile-menu-btn {
        min-height: 44px;
        padding: 0 8px;
        border-radius: var(--nf-radius);
        font-size: 13px;
    }
    .nf-header__left {
        gap: 8px;
    }
    .nf-header__right {
        gap: 6px;
    }
    .nf-mobile-nav {
        top: calc(var(--nf-header-h) + env(safe-area-inset-top));
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        background: rgba(0,0,0,.98);
        animation: nfMobileNavIn 0.25s ease;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .nf-mobile-nav a {
        padding: 14px 0;
        font-size: 15px;
        font-weight: 600;
    }
    @keyframes nfMobileNavIn {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}
@media (max-width: 480px) {
    .nf-logo {
        height: 28px;
    }
    .nf-header {
        padding-left: 2%;
        padding-right: 2%;
        --nf-header-h: 56px;
    }
    .nf-mobile-menu-btn {
        font-size: 12px;
        padding: 0 6px;
        min-height: 40px;
    }
}

/* ==========================================================================
   Section Switching
   ========================================================================== */
.content-section {
    display: none;
    padding-top: 68px;
}

.content-section.active {
    display: block;
    animation: nfFadeIn 0.3s ease;
}

@keyframes nfFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Your Next Watch (Replaces Billboard)
   ========================================================================== */
.nf-next-watch {
    padding: 0;
    height: min(56.25vw, 780px);
    min-height: 560px;
    margin-top: -68px;
    margin-bottom: -70px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.nf-next-watch__carousel {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
}
.nf-next-watch__carousel::-webkit-scrollbar { display: none; }

.nf-next-watch__card {
    position: absolute;
    inset: auto auto 125px auto;
    right: calc(var(--nf-row-padding) + 150px);
    width: 92px;
    height: 138px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease;
    background: #111;
    opacity: 0.72;
    box-shadow: 0 8px 24px rgba(0,0,0,.55);
    z-index: 3;
}
.nf-next-watch__card:nth-child(3) { transform: translateX(108px); }
.nf-next-watch__card:nth-child(4) { transform: translateX(216px); }
.nf-next-watch__card:nth-child(n+5) { display: none; }
.nf-next-watch__card:hover {
    opacity: 1;
    transform: translateY(-8px);
}

.nf-next-watch__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

/* The Expanded Active Card */
.nf-next-watch__card.active {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    cursor: default;
    opacity: 1;
    transform: none;
    box-shadow: none;
    z-index: 1;
}
.nf-next-watch__card.active img { filter: saturate(1.05) contrast(1.02); }

.nf-next-watch__active-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 760px;
    padding: 60px var(--nf-row-padding) 120px;
    background:
        linear-gradient(0deg, var(--nf-black) 0%, rgba(20,20,20,.82) 30%, rgba(20,20,20,.3) 65%, transparent 100%),
        linear-gradient(90deg, rgba(20,20,20,.95) 0%, rgba(20,20,20,.6) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.35s ease 0.12s;
    pointer-events: none;
}
.nf-next-watch__card.active .nf-next-watch__active-info {
    opacity: 1;
    pointer-events: auto;
}

.nf-next-watch__eyebrow {
    color: #fff;
    font-size: clamp(13px, 1.2vw, 17px);
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.nf-next-watch__title-text {
    font-size: clamp(28px, 4vw, 56px);
    line-height: 1.05;
    font-weight: 900;
    max-width: 680px;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
}

.nf-next-watch__badges {
    display: flex;
    gap: 8px;
    align-items: center;
}
.nf-next-watch__badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nf-next-watch__badge--red {
    background: var(--nf-red);
}

.nf-next-watch__overview {
    max-width: 560px;
    margin-top: 14px;
    color: rgba(255,255,255,.88);
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0,0,0,.7);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-next-watch__actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}

.nf-next-watch__meta {
    margin-top: 20px;
    max-width: 800px;
    padding: 0 5px;
}
.nf-next-watch__tags {
    color: var(--nf-gray-light);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nf-next-watch__desc {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile: convert hero carousel to swipeable full-width slider */
@media (max-width: 799px) {
    .nf-next-watch {
        min-height: 420px;
        height: 56vh;
        overflow: visible;
        margin-top: 0;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
    }
    #home.content-section {
        padding-top: 0;
    }
    #homeRows {
        margin-top: 88px;
    }
    .nf-next-watch > .nf-row__title {
        display: none;
    }
    .nf-next-watch__carousel {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        position: absolute;
        inset: 0;
        scrollbar-width: none;
    }
    .nf-next-watch__carousel::-webkit-scrollbar { display: none; }
    .nf-next-watch__card {
        position: relative;
        inset: auto;
        right: auto;
        bottom: auto;
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
        opacity: 1;
        box-shadow: none;
        scroll-snap-align: start;
        transform: none !important;
        z-index: 1;
    }
    .nf-next-watch__card:nth-child(3),
    .nf-next-watch__card:nth-child(4),
    .nf-next-watch__card:nth-child(n+5) {
        display: block;
        transform: none !important;
    }
    .nf-next-watch__card:hover {
        transform: none;
        opacity: 1;
    }
    .nf-next-watch__card.active {
        z-index: 1;
    }
    .nf-next-watch__active-info {
        opacity: 1;
        pointer-events: auto;
        justify-content: flex-end;
        padding: 40px var(--nf-row-padding) 80px;
        max-width: none;
        background:
            linear-gradient(0deg, var(--nf-black) 0%, rgba(20,20,20,.8) 28%, transparent 60%),
            linear-gradient(90deg, rgba(20,20,20,.88), rgba(20,20,20,.2));
    }
    .nf-next-watch__title-text {
        font-size: clamp(22px, 7vw, 38px);
        max-width: 92%;
        margin-bottom: 8px;
    }
    .nf-next-watch__badges {
        gap: 4px;
    }
    .nf-next-watch__badge {
        padding: 2px 6px;
        font-size: 9px;
    }
    .nf-next-watch__overview { display: none; }
    .nf-next-watch__actions { margin-top: 14px; gap: 8px; }
    .nf-next-watch__meta {
        margin-top: 56vh;
        padding: 0 var(--nf-row-padding) 16px;
    }
    .nf-next-watch__tags {
        font-size: 12px;
        gap: 5px;
    }
    .nf-next-watch__desc {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.nf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border-radius: var(--nf-radius);
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    transition: all var(--nf-transition);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .nf-btn { padding: 8px 18px; font-size: 13px; }
    .nf-btn svg { width: 20px; height: 20px; }
}

.nf-btn svg { width: 24px; height: 24px; }

.nf-btn--play {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nf-btn--play:hover { 
    background: rgba(255,255,255,.75); 
    transform: scale(1.02);
}

.nf-btn--info {
    background: rgba(109,109,110,.7);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nf-btn--info:hover { 
    background: rgba(109,109,110,.4); 
    transform: scale(1.02);
}

.nf-btn--info.like-active {
    color: var(--nf-red);
    border: 1px solid var(--nf-red);
}



/* ==========================================================================
   Content Rows
   ========================================================================== */
.nf-row {
    position: relative;
    margin-bottom: 2vw;
    padding: 0;
}

.nf-row__header {
    display: flex;
    align-items: baseline;
    padding: 0 var(--nf-row-padding);
    margin-bottom: 4px;
}

.nf-row__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--nf-white);
    transition: color var(--nf-transition);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (min-width: 1100px) {
    .nf-row__title { font-size: 20px; }
}

.nf-row__explore {
    font-size: 12px;
    color: #54b9c5;
    margin-left: 8px;
    opacity: 0;
    transition: opacity var(--nf-transition), transform var(--nf-transition);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}

.nf-row__explore svg {
    transition: transform 0.3s ease;
}

.nf-row:hover .nf-row__explore {
    opacity: 1;
}

.nf-row__explore:hover svg {
    transform: translateX(3px);
}

/* Mobile: hide hover-only "Explore All", tighten row spacing, and add touch snap */
@media (max-width: 768px) {
    .nf-row__explore {
        display: none;
    }
    .nf-row {
        margin-bottom: 3.5vw;
    }
    .nf-row__title {
        font-size: 15px;
    }
    .nf-slider__track {
        scroll-snap-stop: always;
        padding-top: 4px;
        padding-bottom: 4px;
    }
}
@media (max-width: 480px) {
    .nf-row__title {
        font-size: 14px;
    }
    .nf-row__header {
        padding: 0 4%;
    }
}

/* Slider container */
.nf-slider {
    position: relative;
    overflow: visible;
}

.nf-slider__track {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px var(--nf-row-padding);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    align-items: stretch;
}

.nf-slider__track::-webkit-scrollbar { display: none; }

/* Scroll arrows */
.nf-slider__arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20,20,20,.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    border: none;
}

.nf-row:hover .nf-slider__arrow {
    opacity: 1;
}

.nf-slider__arrow:hover {
    background: rgba(20,20,20,.85);
    transform: scale(1.05);
}

.nf-slider__arrow--left { left: 0; border-radius: 0 var(--nf-radius) var(--nf-radius) 0; }
.nf-slider__arrow--right { right: 0; border-radius: var(--nf-radius) 0 0 var(--nf-radius); }

.nf-slider__arrow svg { width: 36px; height: 36px; }

/* ==========================================================================
   Movie Card (Accordion Style)
   ========================================================================== */
.nf-card {
    flex: 0 0 calc((100% - 30px) / 6);
    height: 350px;
    scroll-snap-align: start;
    position: relative;
    cursor: pointer;
    border-radius: var(--nf-radius);
    overflow: hidden;
    transition: flex 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: var(--nf-elevated);
}

@media (max-width: 1399px) { .nf-card { flex: 0 0 calc((100% - 24px) / 5); height: 320px; } }
@media (max-width: 1099px) { .nf-card { flex: 0 0 calc((100% - 18px) / 4); height: 280px; } }
@media (max-width: 799px) { .nf-card { flex: 0 0 calc((100% - 12px) / 2.5); height: 350px; } }
@media (max-width: 499px) { .nf-card { flex: 0 0 calc((100% - 6px) / 2); height: 320px; } }

/* Accordion shrink/expand completely removed - simple hover preview only */
.nf-slider__track:hover .nf-card {
    /* Keep normal size when hovering on row - match base card sizes */
    flex: 0 0 calc((100% - 30px) / 6);
    transition-delay: 0s;
}

@media (max-width: 1399px) {
    .nf-slider__track:hover .nf-card {
        flex: 0 0 calc((100% - 24px) / 5);
    }
}

@media (max-width: 1099px) {
    .nf-slider__track:hover .nf-card {
        flex: 0 0 calc((100% - 18px) / 4);
    }
}

@media (max-width: 799px) {
    .nf-slider__track:hover .nf-card {
        flex: 0 0 calc((100% - 12px) / 2.5);
    }
}

@media (max-width: 499px) {
    .nf-slider__track:hover .nf-card {
        flex: 0 0 calc((100% - 6px) / 2);
    }
}

@media (min-width: 800px) {
    .nf-slider__track .nf-card:hover {
        /* Slightly grow on hover */
        flex: 0 0 calc(18% - 6px);
        transition-delay: 0.2s;
    }
}

/* Touch devices (and narrow screens): disable the accordion hover shrink/expand
   and hover preview overlay so rows stay as plain scrolling cards on mobile. */
@media (max-width: 799px) {
    .nf-slider__track:hover .nf-card,
    .nf-slider__track .nf-card:hover {
        flex: 0 0 calc((100% - 12px) / 2.5);
        transition-delay: 0s;
    }
    .nf-card:hover .nf-card__img {
        opacity: 1;
        transition-delay: 0s;
    }
    .nf-card:hover .nf-card__preview {
        opacity: 0;
        transition-delay: 0s;
    }
    .nf-card__preview {
        display: none;
    }
    /* Disable hover effects completely on mobile */
    .nf-card:hover {
        transform: none;
    }
}
@media (max-width: 499px) {
    .nf-slider__track:hover .nf-card,
    .nf-slider__track .nf-card:hover {
        flex: 0 0 calc((100% - 6px) / 2);
    }
}

.nf-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: opacity 0.4s ease;
}

.nf-card:hover .nf-card__img {
    opacity: 0.3; /* Partially fade instead of hiding completely */
    transition-delay: 0.2s;
}

/* ---------- Hover Preview Card ---------- */
.nf-card__preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(20,20,20,1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.nf-card:hover .nf-card__preview {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.2s;
}

.nf-continue-card {
    flex: 0 0 calc((100% - 30px) / 6);
    height: 350px;
    scroll-snap-align: start;
}

@media (max-width: 1399px) { .nf-continue-card { flex: 0 0 calc((100% - 24px) / 5); height: 320px; } }
@media (max-width: 1099px) { .nf-continue-card { flex: 0 0 calc((100% - 18px) / 4); height: 280px; } }
@media (max-width: 799px) { .nf-continue-card { flex: 0 0 calc((100% - 12px) / 2.5); height: 350px; } }
@media (max-width: 499px) { .nf-continue-card { flex: 0 0 calc((100% - 6px) / 2); height: 320px; } }

.nf-continue-card__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255,255,255,.35);
    pointer-events: none;
}

.nf-continue-card__progress-fill {
    height: 100%;
    background: var(--nf-red);
}

.nf-continue-card__ep {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,.72);
    border-left: 3px solid var(--nf-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 3px 7px;
    border-radius: 3px;
    pointer-events: none;
}

.nf-continue-card__resume {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 3px;
    pointer-events: none;
}

.nf-continue-card:hover .nf-continue-card__progress,
.nf-continue-card:hover .nf-continue-card__ep,
.nf-continue-card:hover .nf-continue-card__resume {
    opacity: 0;
}

.nf-card__preview-img {
    width: 100%;
    height: 55%;
    object-fit: cover;
    display: block;
}

.nf-card__preview-body {
    padding: 8px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to bottom, rgba(20,20,20,0) 0%, rgba(20,20,20,1) 30%);
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

.nf-card__preview-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.nf-card__preview-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.4);
    background: rgba(42,42,42,.6);
    color: #fff;
    transition: all 0.25s ease;
}

.nf-card__preview-btn:hover {
    border-color: #fff;
    background: rgba(255,255,255,.15);
    transform: scale(1.1);
}

.nf-card__preview-btn--play {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nf-card__preview-btn--play:hover {
    background: rgba(255,255,255,.85);
}

.nf-card__preview-btn--remove {
    border-color: var(--nf-red);
    background: var(--nf-red);
    color: #fff;
}

.nf-card__preview-btn.like-active {
    border-color: var(--nf-red);
    color: var(--nf-red);
}

.nf-card__preview-btn.like-active:hover {
    background: rgba(229, 9, 20, 0.15);
}

.nf-card__preview-btn--remove:hover {
    border-color: var(--nf-red-hover);
    background: var(--nf-red-hover);
}

.nf-card__preview-btn--expand {
    margin-left: auto;
}

.nf-card__preview-btn svg { width: 20px; height: 20px; }

.nf-card__preview-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.nf-match {
    color: #46d369;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.nf-maturity {
    padding: 1px 5px;
    border: 1px solid rgba(255,255,255,.4);
    font-size: 11px;
    font-weight: 600;
}

.nf-badge {
    padding: 1px 4px;
    border: 1px solid rgba(255,255,255,.4);
    font-size: 10px;
    font-weight: 700;
}

.nf-new-badge {
    background: var(--nf-red);
    color: #fff;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 2px;
    text-transform: uppercase;
}

.nf-card__preview-description {
    font-size: 12px;
    line-height: 1.4;
    color: var(--nf-text);
    margin: 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.nf-card__preview-genres {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 11px;
    color: var(--nf-gray-light);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.nf-card__preview-genres span.dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--nf-gray);
    display: inline-block;
}

/* Top 10 Row — Netflix signature large rank numbers */
.nf-top10-card {
    flex: 0 0 calc((100% - 30px) / 6);
    height: 260px;
    scroll-snap-align: start;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: stretch;
    overflow: visible;
    background: transparent;
}

@media (max-width: 1399px) { .nf-top10-card { flex: 0 0 calc((100% - 24px) / 5); height: 230px; } }
@media (max-width: 1099px) { .nf-top10-card { flex: 0 0 calc((100% - 18px) / 4); height: 200px; } }
@media (max-width: 799px) { .nf-top10-card { flex: 0 0 calc((100% - 12px) / 2.5); height: 180px; } }
@media (max-width: 499px) { .nf-top10-card { flex: 0 0 calc((100% - 6px) / 2); height: 160px; } }

.nf-top10-card__rank {
    position: relative;
    flex: 0 0 45%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: clamp(100px, 14vw, 200px);
    font-weight: 900;
    line-height: 0.8;
    color: transparent;
    -webkit-text-stroke: 3px rgba(255,255,255,.3);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    user-select: none;
    pointer-events: none;
    padding-bottom: 5px;
}

.nf-top10-card__poster {
    flex: 1;
    position: relative;
    border-radius: var(--nf-radius);
    overflow: hidden;
    margin-left: -15px;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(.25,1,.5,1), box-shadow 0.3s ease;
}

.nf-top10-card:hover .nf-top10-card__poster {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0,0,0,.6);
}

.nf-top10-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nf-top10-card__badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--nf-red);
    color: #fff;
    font-size: 7px;
    font-weight: 900;
    padding: 2px 4px;
    border-radius: 2px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.nf-top10-card__badge span:last-child {
    font-size: 12px;
}

/* Category grid */
.nf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    padding: 0 var(--nf-row-padding);
}

@media (max-width: 600px) {
    .nf-grid { grid-template-columns: repeat(2, 1fr); }
}

.nf-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--nf-gray);
}

.nf-empty h2 {
    font-size: 20px;
    color: var(--nf-white);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Grid card overrides — cards in grid should fill cells, not use flex-basis */
.nf-grid .nf-card {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 2/3;
}

.nf-grid .nf-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.nf-grid .nf-card__preview {
    position: absolute;
    inset: 0;
}

/* Disable accordion shrink/expand in grids */
.nf-grid:hover .nf-card {
    flex: none;
}

.nf-grid .nf-card:hover {
    flex: none;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    transition: transform 0.3s cubic-bezier(.25,1,.5,1), box-shadow 0.3s ease;
}

/* ==========================================================================
   Detail Modal (More Info)
   ========================================================================== */
.nf-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 150;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2vh;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.nf-detail-overlay.active { display: flex; }

.nf-detail {
    width: 95%;
    max-width: 850px;
    background: rgba(20,20,20,.98);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 5vh;
    position: relative;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8);
    animation: nfModalSlideUp 0.4s cubic-bezier(.25,.1,.25,1);
}

@keyframes nfModalSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.nf-detail__hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.nf-detail__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nf-detail__hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, var(--nf-dark));
}

.nf-detail__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20,20,20,.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 18px;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

.nf-detail__close:hover {
    background: rgba(255,255,255,.15);
    transform: rotate(90deg) scale(1.1);
}

.nf-detail__hero-info {
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 24px;
    z-index: 5;
}

.nf-detail__hero-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.nf-detail__hero-buttons {
    display: flex;
    gap: 8px;
}

.nf-detail__body {
    padding: 20px 24px 30px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
}

@media (max-width: 600px) {
    .nf-detail__body { grid-template-columns: 1fr; }
}

.nf-detail__meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.nf-detail__overview {
    font-size: 14px;
    line-height: 1.6;
    color: var(--nf-white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.nf-detail__sidebar-item {
    font-size: 13px;
    color: var(--nf-gray);
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.nf-detail__sidebar-item span {
    color: var(--nf-white);
}

/* Episodes tab in detail */
.nf-detail__episodes {
    padding: 0 24px 30px;
}

.nf-detail__episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.nf-detail__episodes-header h3 {
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.nf-detail__season-select {
    padding: 8px 12px;
    background: var(--nf-dark);
    color: #fff;
    border: 1px solid var(--nf-gray-dark);
    border-radius: var(--nf-radius);
    font-size: 14px;
    font-family: var(--nf-font);
    cursor: pointer;
}

.nf-detail__ep-item,
.nf-detail__ep-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 8px;
    margin-bottom: 4px;
    position: relative;
}

.nf-detail__ep-item:hover,
.nf-detail__ep-card:hover { 
    background: rgba(255,255,255,.06); 
    transform: translateX(4px);
    border-color: transparent;
}

.nf-detail__ep-num {
    font-size: 22px;
    font-weight: 500;
    color: var(--nf-gray);
    min-width: 32px;
    text-align: center;
    padding-top: 8px;
}

.nf-detail__ep-thumb-wrapper {
    width: 130px;
    flex-shrink: 0;
    position: relative;
}

.nf-detail__ep-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--nf-radius);
    object-fit: cover;
    background: var(--nf-elevated);
    display: block;
}

/* Episode skeleton loading state */
.nf-skel-box {
    background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.06) 75%);
    background-size: 400% 100%;
    animation: nf-skeleton-shimmer 1.4s ease infinite;
}
@keyframes nf-skeleton-shimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}
.nf-detail__ep-skeleton {
    pointer-events: none;
    cursor: default;
}
.nf-detail__ep-skeleton:hover {
    background: transparent;
    transform: none;
}

/* Episode progress bar */
.nf-detail__ep-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 0 0 var(--nf-radius) var(--nf-radius);
    overflow: hidden;
}

.nf-detail__ep-progress-fill {
    height: 100%;
    background: #e50914;
    transition: width 0.3s ease;
}

.nf-detail__ep-info {
    flex: 1;
    min-width: 0;
}

.nf-detail__ep-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.nf-detail__ep-runtime {
    color: var(--nf-gray);
    font-weight: 400;
}

.nf-detail__ep-desc {
    font-size: 13px;
    color: var(--nf-gray);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* More Like This */
.nf-detail__more {
    padding: 0 24px 30px;
}

.nf-detail__more h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.nf-detail__more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .nf-detail__more-grid { grid-template-columns: repeat(2, 1fr); }
}

.nf-detail__more-card {
    background: rgba(24,24,24,.8);
    border-radius: var(--nf-radius-lg);
    border: 1px solid rgba(255,255,255,.05);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

.nf-detail__more-card:hover { 
    background: rgba(255,255,255,.05); 
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,.15);
}

.nf-detail__more-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.nf-detail__more-card-body {
    padding: 10px;
}

.nf-detail__more-card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.nf-detail__more-card-desc {
    font-size: 11px;
    color: var(--nf-gray);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Cast & Crew */
.nf-detail__cast {
    padding: 0 24px 10px;
}

.nf-detail__cast h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.nf-detail__cast-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.3) transparent;
}

.nf-detail__cast-row::-webkit-scrollbar {
    height: 6px;
}

.nf-detail__cast-row::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.3);
    border-radius: 3px;
}

.nf-detail__cast-card {
    flex: 0 0 92px;
    text-align: center;
    cursor: pointer;
}

.nf-detail__cast-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.1);
}

.nf-detail__cast-avatar--initials {
    font-size: 28px;
    font-weight: 800;
    color: var(--nf-white);
}

.nf-detail__cast-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-detail__cast-role {
    font-size: 11px;
    color: var(--nf-gray);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .nf-detail__cast { padding: 0 16px 8px; }
    .nf-detail__cast-card { flex-basis: 76px; }
    .nf-detail__cast-avatar { width: 68px; height: 68px; font-size: 22px; }
}

@media (max-width: 600px) {
    .nf-detail__episodes {
        padding: 0 12px 20px;
    }
    .nf-detail__ep-item,
    .nf-detail__ep-card {
        gap: 8px;
        padding: 12px 8px;
    }
    .nf-detail__ep-num {
        font-size: 15px;
        min-width: 22px;
        padding-top: 4px;
    }
    .nf-detail__ep-thumb-wrapper {
        width: 90px;
    }
    .nf-detail__ep-title {
        font-size: 13px;
    }
    .nf-detail__ep-desc {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
    .nf-detail__hero-title {
        font-size: clamp(16px, 5vw, 24px);
    }
    .nf-detail__hero-info {
        bottom: 12px;
        left: 12px;
        right: 12px;
    }
    .nf-detail__episodes-header h3 {
        font-size: 16px;
    }
    .nf-detail__season-select {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* ==========================================================================
   Search Section
   ========================================================================== */
.nf-search-section {
    padding-top: calc(var(--nf-header-h) + 20px);
    padding-left: var(--nf-row-padding);
    padding-right: var(--nf-row-padding);
    min-height: 80vh;
}

.nf-search-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.nf-search-bar {
    position: relative;
    max-width: 600px;
    margin-bottom: 30px;
}

.nf-search-bar__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nf-gray);
    width: 20px; height: 20px;
}

.nf-search-bar__input {
    width: 100%;
    padding: 12px 44px 12px 44px;
    background: rgba(20,20,20,.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-family: var(--nf-font);
    outline: none;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

.nf-search-bar__input:focus {
    border-color: var(--nf-red);
    background: rgba(20,20,20,.9);
    box-shadow: 0 0 0 4px rgba(229,9,20,.15);
}

/* Search suggestions dropdown */
.nf-search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(28,28,28,.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,.7);
    z-index: 50;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    animation: nfSuggestIn 0.2s cubic-bezier(.4,0,.2,1);
}

.nf-search-suggestions.active {
    display: block;
}

@keyframes nfSuggestIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.nf-search-suggestions::-webkit-scrollbar { width: 6px; }
.nf-search-suggestions::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }

.nf-search-suggest-section {
    padding: 8px 0;
}

.nf-search-suggest-section + .nf-search-suggest-section {
    border-top: 1px solid rgba(255,255,255,.06);
}

.nf-search-suggest-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,.35);
    padding: 8px 16px 4px;
}

.nf-search-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.nf-search-suggest-item:hover,
.nf-search-suggest-item.highlighted {
    background: rgba(255,255,255,.08);
}

.nf-search-suggest-item__img {
    width: 36px;
    height: 54px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--nf-elevated);
    flex-shrink: 0;
}

.nf-search-suggest-item__thumb {
    width: 44px;
    height: 26px;
    border-radius: 3px;
    object-fit: cover;
    background: var(--nf-elevated);
    flex-shrink: 0;
}

.nf-search-suggest-item__info {
    flex: 1;
    min-width: 0;
}

.nf-search-suggest-item__title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nf-search-suggest-item__meta {
    font-size: 12px;
    color: rgba(255,255,255,.4);
    margin-top: 1px;
}

.nf-search-suggest-item__remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.35);
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.nf-search-suggest-item__remove:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.nf-search-suggest-item__match {
    color: var(--nf-red);
}

.nf-search-did-you-mean {
    padding: 10px 16px;
    font-size: 13px;
    color: rgba(255,255,255,.5);
}

.nf-search-did-you-mean span {
    color: var(--nf-red);
    cursor: pointer;
    font-weight: 600;
}

.nf-search-did-you-mean span:hover {
    text-decoration: underline;
}

/* Genre chips (search by genre) */
.nf-genre-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    max-width: 700px;
}

.nf-genre-chip {
    padding: 7px 15px;
    background: rgba(20,20,20,.6);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: #e5e5e5;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--nf-font);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

.nf-genre-chip:hover {
    border-color: var(--nf-red);
    color: #fff;
}

.nf-genre-chip.active {
    background: var(--nf-red);
    border-color: var(--nf-red);
    color: #fff;
    box-shadow: 0 2px 12px rgba(229,9,20,.35);
}

/* Category section pages */
.nf-category-page {
    padding-top: calc(var(--nf-header-h) + 20px);
    padding-left: var(--nf-row-padding);
    padding-right: var(--nf-row-padding);
    min-height: 80vh;
}

.nf-category-page h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Skeleton Loading Cards */
@keyframes nfShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.nf-skeleton {
    background: linear-gradient(90deg, var(--nf-elevated) 25%, var(--nf-card) 50%, var(--nf-elevated) 75%);
    background-size: 200% 100%;
    animation: nfShimmer 1.5s ease infinite;
    border-radius: var(--nf-radius);
}

.nf-skeleton-card {
    flex: 0 0 calc((100% - 30px) / 6);
    height: 260px;
    scroll-snap-align: start;
    border-radius: var(--nf-radius);
}

@media (max-width: 1399px) { .nf-skeleton-card { flex: 0 0 calc((100% - 24px) / 5); height: 230px; } }
@media (max-width: 1099px) { .nf-skeleton-card { flex: 0 0 calc((100% - 18px) / 4); height: 200px; } }
@media (max-width: 799px) { .nf-skeleton-card { flex: 0 0 calc((100% - 12px) / 2.5); height: 180px; } }
@media (max-width: 499px) { .nf-skeleton-card { flex: 0 0 calc((100% - 6px) / 2); height: 160px; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.nf-footer {
    padding: 30px var(--nf-row-padding) 50px;
    color: var(--nf-gray);
    margin-top: 40px;
}

.nf-footer__social {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.nf-footer__social a {
    color: var(--nf-gray);
    transition: opacity var(--nf-transition);
}

.nf-footer__social a:hover { opacity: .75; }
.nf-footer__social svg { width: 24px; height: 24px; }

.nf-footer__links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .nf-footer__links { grid-template-columns: repeat(2, 1fr); }
}

.nf-footer__links a {
    font-size: 13px;
    color: var(--nf-gray);
    transition: color var(--nf-transition);
}

.nf-footer__links a:hover { color: var(--nf-gray-light); text-decoration: underline; }

.nf-footer__service-code {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid var(--nf-gray);
    font-size: 13px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: color var(--nf-transition);
}

.nf-footer__service-code:hover { color: var(--nf-gray-light); }

.nf-footer__copy {
    font-size: 12px;
}

/* ==========================================================================
   NOTIFICATION TOAST
   ========================================================================== */
.nf-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20,20,20,.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    border: 1px solid rgba(255,255,255,.1);
    border-left: 3px solid var(--nf-red);
    z-index: 300;
    opacity: 0;
    transition: all 0.4s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}

.nf-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   VIDEO PLAYER — NETFLIX PREMIUM FULLSCREEN OVERLAY
   ========================================================================== */
.nf-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: #000;
    display: none;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* Keep drawers and sliders scrollable/draggable on touch devices. */
.nf-player__drawer,
.nf-player__episodes-drawer {
    touch-action: pan-y;
}

.nf-player input[type="range"] {
    touch-action: none;
}

.nf-player.active {
    display: block;
    animation: nfPlayerFadeIn 0.35s ease;
}

@keyframes nfPlayerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Video element */
.nf-player__video-wrap {
    position: absolute;
    inset: 0;
}

.nf-player__video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    transition: filter 0.3s ease;
}

/* Hide DPlayer built-in controls */
.dplayer-controller-mask,
.dplayer-controller {
    display: none !important;
}

/* Loading overlay */
.nf-player__loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.92);
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1);
}

.nf-player__loading.hidden { opacity: 0; pointer-events: none; }

.nf-player__loading-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #e50914;
    animation: nfSpin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes nfSpin {
    to { transform: rotate(360deg); }
}

.nf-player__loading-text {
    font-size: 15px;
    color: var(--nf-gray-light);
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* Error overlay */
.nf-player__error {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.95);
    text-align: center;
    padding: 24px;
}

.nf-player__error.active {
    display: flex;
    animation: nfErrorIn 0.35s ease;
}

@keyframes nfErrorIn {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

.nf-player__error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(229,9,20,.1);
    border: 2px solid rgba(229,9,20,.25);
    color: var(--nf-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 20px;
}

.nf-player__error h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.nf-player__error p {
    font-size: 15px;
    color: rgba(255,255,255,.55);
    max-width: 420px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.nf-player__error-btn {
    padding: 12px 32px;
    background: var(--nf-red);
    color: #fff;
    border-radius: var(--nf-radius);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(229,9,20,.3);
}

.nf-player__error-btn:hover {
    background: var(--nf-red-hover);
    box-shadow: 0 6px 28px rgba(229,9,20,.45);
    transform: translateY(-1px);
}

/* Center play/pause button - Netflix style */
.nf-player__center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    transition: none;
}

.nf-player__center-icon.animate {
    animation: nfCenterPop 0.6s cubic-bezier(.22,.68,0,1.08) forwards;
}

@keyframes nfCenterPop {
    0% { transform: translate(-50%,-50%) scale(0); opacity: 0.9; }
    40% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(1.1); opacity: 0; }
}

.nf-player__center-icon svg {
    width: 56px;
    height: 56px;
    fill: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}

.nf-player__center-icon svg.pause-icon {
    margin-left: 0;
}

/* ---------- Double-Tap Seek Ripple ---------- */
.nf-player__seek-ripple {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 38%;
    z-index: 14;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
}

.nf-player__seek-ripple--left {
    left: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.06) 0%, transparent 70%);
}

.nf-player__seek-ripple--right {
    right: 0;
    background: radial-gradient(circle at 70% 50%, rgba(255,255,255,.06) 0%, transparent 70%);
}

.nf-player__seek-ripple.animate {
    animation: nfSeekRipple 0.65s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes nfSeekRipple {
    0% { opacity: 0; }
    25% { opacity: 1; }
    100% { opacity: 0; }
}

.nf-player__seek-ripple__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.nf-player__seek-ripple__inner svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

/* ---------- Controls Container ---------- */
.nf-player__controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: block;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1), visibility 0s;
    box-sizing: border-box;
}

/* When collapsed, not just fade out: fully inert so children can't be
   interacted with. visibility switches off AFTER the fade completes; the
   descendant pointer-events override kills interactivity immediately
   (children like .nf-player__top force pointer-events: auto otherwise). */
.nf-player__controls.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(.4,0,.2,1), visibility 0s linear 0.6s;
}

.nf-player__controls.hidden .nf-player__top,
.nf-player__controls.hidden .nf-player__bottom,
.nf-player__controls.hidden .nf-player__timeline,
.nf-player__controls.hidden * {
    pointer-events: none !important;
}

/* ---------- Top Bar ---------- */
.nf-player__top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 14px 16px 60px;
    background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, transparent 100%);
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    z-index: 3;
}

.nf-player__back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.2s ease;
    position: relative;
    z-index: 4;
    pointer-events: auto;
}

.nf-player__back-btn:hover {
    background: rgba(255,255,255,.1);
}

.nf-player__back-btn svg {
    width: 24px;
    height: 24px;
}

.nf-player__top-info {
    flex: 1;
    margin: 0 20px;
    display: none;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.nf-player.iframe-mode .nf-player__top-info {
    display: flex;
}
.nf-player__top-title { font-size: 18px; font-weight: 700; line-height: 1.2; }
.nf-player__top-ep { font-size: 14px; color: var(--nf-gray-light); margin-top: 2px; }

.nf-player__top-server-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(20,20,20,0.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: var(--nf-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}
.nf-player__top-server-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.05); }
.nf-player.iframe-mode .nf-player__top-server-btn { display: flex; }

/* ---------- Bottom Area ---------- */
.nf-player__bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 100px 16px 12px;
    background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.5) 30%, transparent 100%);
    pointer-events: auto;
}

/* Title info */
.nf-player__info {
    max-width: 550px;
    margin-bottom: 10px;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.nf-player__logo {
    max-height: 90px;
    max-width: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.6));
    pointer-events: none;
}

.nf-player__logo.visible {
    display: block;
    opacity: 1;
}

@media (max-width: 600px) {
    .nf-player__logo { max-height: 56px; max-width: 210px; }
}

/* Tablets and landscape phones that don't match the 768px query: keep the
   logo and info block compact so it can never cover the player controls. */
@media (max-width: 1024px) {
    .nf-player__info { max-width: 45vw; }
    .nf-player__logo { max-height: 34px; max-width: 130px; }
}

.nf-player__show-title {
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.2px;
    text-shadow: 0 2px 4px rgba(0,0,0,.6);
    line-height: 1.2;
    margin-bottom: 4px;
}

.nf-player__meta-text {
    font-size: 14px;
    color: rgba(255,255,255,.7);
    font-weight: 400;
    margin-top: 0;
}

.nf-player__ep-title {
    font-size: 14px;
    font-weight: 500;
    margin-top: 2px;
    color: rgba(255,255,255,.85);
}

.nf-player__overview {
    font-size: 13px;
    color: rgba(255,255,255,.55);
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}

/* ---------- Timeline / Seek Bar ---------- */
.nf-player__timeline {
    position: relative;
    width: 100%;
    height: 28px;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    padding: 0 2px;
    margin-bottom: 4px;
}

.nf-player__timeline-bar {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,.3);
    position: relative;
    border-radius: 2px;
    overflow: visible;
    transition: height 0.15s cubic-bezier(.4,0,.2,1);
}

.nf-player__timeline:hover .nf-player__timeline-bar {
    height: 5px;
}

.nf-player__timeline-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,.35);
    border-radius: 2px;
    width: 0;
    pointer-events: none;
}

.nf-player__timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #e50914;
    border-radius: 2px;
    width: 0;
    pointer-events: none;
}

.nf-player__timeline-thumb {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 13px;
    height: 13px;
    background: #e50914;
    border: 2px solid #fff;
    border-radius: 50%;
    transition: transform 0.15s cubic-bezier(.4,0,.2,1);
}

.nf-player__timeline:hover .nf-player__timeline-thumb {
    transform: translateY(-50%) scale(1);
}

.nf-player__timeline-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: rgba(20,20,20,.95);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    display: none;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
    letter-spacing: 0.5px;
}

.nf-player__timeline:hover .nf-player__timeline-tooltip {
    display: block;
}

/* ---------- Bottom Controls Row ---------- */
.nf-player__controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.nf-player__controls-left,
.nf-player__controls-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---------- Control Button Base ---------- */
.nf-player__ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
    position: relative;
    background: transparent;
}

.nf-player__ctrl-btn:hover {
    transform: scale(1.15);
}

.nf-player__ctrl-btn:active {
    transform: scale(0.9);
}

.nf-player__ctrl-btn svg {
    width: 28px;
    height: 28px;
}

.nf-player__ctrl-btn--small svg {
    width: 22px;
    height: 22px;
}

/* ---------- Volume Group ---------- */
.nf-player__volume-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.nf-player__volume-slider {
    width: 0;
    overflow: hidden;
    transition: width 0.25s cubic-bezier(.4,0,.2,1), margin 0.25s cubic-bezier(.4,0,.2,1);
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255,255,255,.25);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    margin-left: 0;
}

.nf-player__volume-group:hover .nf-player__volume-slider {
    width: 90px;
    margin-left: 6px;
}

.nf-player__volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
    transition: transform 0.15s ease;
}

.nf-player__volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.nf-player__volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* ---------- Time Display ---------- */
.nf-player__time {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    font-weight: 400;
    padding: 0 10px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ---------- Text Buttons (Next / Episodes) ---------- */
.nf-player__text-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.nf-player__text-btn:hover {
    opacity: .75;
}

.nf-player__text-btn svg {
    width: 24px;
    height: 24px;
}

/* ---------- Skip Intro ---------- */
.nf-player__skip-btn {
    position: absolute;
    bottom: 100px;
    right: 16px;
    z-index: 25;
    padding: 8px 24px;
    background: rgba(20,20,20,.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.6);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 2px;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: none;
    cursor: pointer;
}

.nf-player__skip-btn > span {
    position: relative;
    z-index: 1;
}

/* Gray countdown fill sweeping left -> right (Netflix-style 10s timer) */
.nf-player__skip-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background: rgba(255,255,255,.22);
    transform: scaleX(0);
    transform-origin: left center;
    pointer-events: none;
}

.nf-player__skip-btn:hover {
    background: rgba(255,255,255,.15);
    border-color: #fff;
}

.nf-player__skip-btn--ad {
    bottom: 136px;
    background: rgba(20,20,20,.72);
    border-color: rgba(255, 170, 0, .8);
    color: #ffc86b;
}

.nf-player__skip-btn--ad:hover {
    background: rgba(255,170,0,.22);
    border-color: #ffb02e;
}


.nf-player__skip-btn.active {
    display: block;
    animation: nfSkipIn 0.4s cubic-bezier(.4,0,.2,1);
}

.nf-player__skip-btn.active::before {
    animation: nfSkipFill 10s linear forwards;
}

.nf-player__skip-btn.fade-out {
    animation: nfSkipOut 0.4s ease forwards !important;
}

.nf-player__skip-btn.fade-out::before {
    animation: none;
}

/* Skip buttons follow the media controls: hidden while the UI is idle,
   visible again the moment controls are shown. */
.nf-player.hide-cursor .nf-player__skip-btn.active {
    display: none;
}

@keyframes nfSkipIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes nfSkipFill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes nfSkipOut {
    to { opacity: 0; transform: translateX(20px); }
}

/* ---------- Next Episode Card ---------- */
.nf-player__next-card {
    position: absolute;
    bottom: 100px;
    right: 16px;
    z-index: 25;
    width: 300px;
    background: rgba(24,24,24,.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.6);
    pointer-events: auto;
    display: none;
}

.nf-player__next-card.active {
    display: block;
    animation: nfNextCardIn 0.45s cubic-bezier(.4,0,.2,1);
}

@keyframes nfNextCardIn {
    from { opacity: 0; transform: translateY(16px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.nf-player__next-card-header {
    padding: 12px 16px;
    font-size: 12px;
    color: rgba(255,255,255,.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nf-player__next-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 6px;
}

.nf-player__next-card-body:hover {
    background: rgba(255,255,255,.05);
}

.nf-player__next-card-thumb {
    width: 88px;
    aspect-ratio: 16/9;
    border-radius: 5px;
    object-fit: cover;
    background: var(--nf-elevated);
    flex-shrink: 0;
}

.nf-player__next-card-info {
    flex: 1;
    min-width: 0;
}

.nf-player__next-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nf-player__next-card-meta {
    font-size: 12px;
    color: rgba(255,255,255,.45);
}

.nf-player__next-card-progress {
    height: 3px;
    background: rgba(255,255,255,.1);
}

.nf-player__next-card-progress-fill {
    height: 100%;
    background: var(--nf-red);
    transition: width 1s linear;
    box-shadow: 0 0 6px rgba(229,9,20,.4);
}

/* ---------- Settings Drawer ---------- */
.nf-player__drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 92vw;
    background: rgba(16,16,16,.94);
    backdrop-filter: blur(28px) saturate(1.2);
    -webkit-backdrop-filter: blur(28px) saturate(1.2);
    border-left: 1px solid rgba(255,255,255,.06);
    z-index: 30;
    display: none;
    flex-direction: column;
    pointer-events: auto;
    overflow: hidden;
    box-shadow: -8px 0 40px rgba(0,0,0,.4);
}

.nf-player__drawer.active {
    display: flex;
    animation: nfDrawerSlideIn 0.3s cubic-bezier(.4,0,.2,1);
}

@keyframes nfDrawerSlideIn {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.nf-player__drawer-header {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.nf-player__settings-back {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 12px;
    outline: none;
}

.nf-player__settings-back:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.nf-player__drawer-header h3 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.2px;
    flex: 1;
}

.nf-player__drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    transition: all 0.2s ease;
    font-size: 16px;
    outline: none;
    border: none;
    background: transparent;
}

.nf-player__drawer-close:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
    transform: rotate(90deg);
}

/* ---------- Settings Menu List ---------- */
.nf-player__settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    outline: none;
}

.nf-player__settings-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.nf-player__settings-item:focus {
    border-color: var(--nf-red);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.15);
}

.nf-player__settings-item-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.nf-player__settings-item-value-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nf-player__settings-item-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nf-player__settings-item-chevron {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1;
    transition: transform 0.2s ease;
}

.nf-player__settings-item:hover .nf-player__settings-item-chevron {
    color: #ffffff;
    transform: translateX(2px);
}

.nf-player__tab-content {
    flex: 1;
    /* min-height: 0 lets the content area shrink below its content height so
       it can actually scroll inside the drawer — otherwise short viewports
       (e.g. landscape phone fullscreen) clip the lower menu items. */
    min-height: 0;
    overflow-y: auto;
    padding: 16px 18px;
}

.nf-player__tab-panel {
    display: none;
}

.nf-player__tab-panel.active {
    display: block;
    animation: nfPanelIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes nfPanelIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Server Card ---------- */
.nf-player__server-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    margin-bottom: 8px;
}

.nf-player__server-card:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.12);
    transform: translateX(-2px);
}

.nf-player__server-card.active {
    background: linear-gradient(135deg, rgba(229,9,20,.14) 0%, rgba(229,9,20,.04) 100%);
    border-color: rgba(229,9,20,.5);
    box-shadow: 0 2px 16px rgba(229,9,20,.15), inset 0 0 0 1px rgba(229,9,20,.1);
}

.nf-player__server-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nf-player__server-flag {
    font-size: 22px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
}

.nf-player__server-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.7);
}

.nf-player__server-card.active .nf-player__server-name {
    color: #fff;
    font-weight: 700;
}

.nf-player__server-desc {
    font-size: 11px;
    color: rgba(255,255,255,.35);
    margin-top: 1px;
}

.nf-player__server-langs {
    font-size: 10.5px;
    color: rgba(255,255,255,.55);
    margin-top: 4px;
    letter-spacing: .2px;
}

.nf-player__server-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--nf-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(229,9,20,.3);
    animation: nfCheckPop 0.3s cubic-bezier(.4,0,.2,1);
}

@keyframes nfCheckPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* ---------- Speed Options ---------- */
.nf-player__speed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.nf-player__speed-btn {
    padding: 12px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    color: rgba(255,255,255,.6);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

.nf-player__speed-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.15);
    color: #fff;
}

.nf-player__speed-btn.active {
    background: var(--nf-red);
    border-color: var(--nf-red);
    color: #fff;
    box-shadow: 0 3px 14px rgba(229,9,20,.35);
    transform: scale(1.02);
}

/* ---------- Quality / Subtitle Option ---------- */
.nf-player__option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.05);
    background: rgba(255,255,255,.03);
    cursor: pointer;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

.nf-player__option-item:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.12);
    color: rgba(255,255,255,.85);
}

.nf-player__option-item.active {
    background: rgba(229,9,20,.1);
    border-color: rgba(229,9,20,.4);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(229,9,20,.08);
}

.nf-player__option-sep {
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
}

/* ---------- Brightness / Contrast / Audio Boost Sliders ---------- */
.nf-player__adjust-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 8px 0;
}

.nf-player__adjust-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    min-width: 85px;
}

.nf-player__adjust-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255,255,255,.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nf-player__adjust-slider:hover {
    background: rgba(255,255,255,.22);
}

.nf-player__adjust-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,.3);
    transition: transform 0.15s ease;
}

.nf-player__adjust-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.nf-player__adjust-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 6px rgba(0,0,0,.3);
}

.nf-player__adjust-value {
    font-size: 13px;
    color: rgba(255,255,255,.45);
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- Episodes Drawer ---------- */
.nf-player__episodes-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 92vw;
    background: rgba(16,16,16,.94);
    backdrop-filter: blur(28px) saturate(1.2);
    -webkit-backdrop-filter: blur(28px) saturate(1.2);
    border-left: 1px solid rgba(255,255,255,.06);
    z-index: 30;
    display: none;
    flex-direction: column;
    pointer-events: auto;
    box-shadow: -8px 0 40px rgba(0,0,0,.4);
}

.nf-player__episodes-drawer.active {
    display: flex;
    animation: nfDrawerSlideIn 0.3s cubic-bezier(.4,0,.2,1);
}

.nf-player__episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.nf-player__episodes-header h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

/* ---------- Custom Season Selector Dropdown ---------- */
.nf-player__custom-select {
    position: relative;
    margin: 16px 22px;
    width: calc(100% - 44px);
    z-index: 35;
}

.nf-player__custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--nf-font);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nf-player__custom-select-trigger:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.nf-player__custom-select-trigger:focus {
    border-color: var(--nf-red);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.25), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nf-player__custom-select-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.nf-player__custom-select.active .nf-player__custom-select-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nf-player__custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(20, 20, 20, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.2s;
    pointer-events: none;
    padding: 6px;
}

.nf-player__custom-select.active .nf-player__custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.nf-player__custom-select-option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nf-player__custom-select-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding-left: 18px;
}

.nf-player__custom-select-option.selected {
    background: rgba(229, 9, 20, 0.15);
    color: var(--nf-red);
    font-weight: 700;
}

.nf-player__episodes-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 22px 22px;
}

/* ---------- Continuous cross-season episode sections ---------- */
.nf-player__ep-section {
    margin-bottom: 10px;
}

.nf-player__ep-season-chip {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 10px;
    padding: 8px 2px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    background: linear-gradient(to right, rgba(16, 16, 16, 0.95), rgba(16, 16, 16, 0.85));
}

.nf-player__ep-season-chip::before {
    content: '';
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: var(--nf-red);
}


/* ---------- Modernized Episode Cards ---------- */
.nf-player__ep-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(15px);
    animation: nfEpFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--index, 0) * 0.05s);
}

@keyframes nfEpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nf-player__ep-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.nf-player__ep-card.active {
    background: rgba(229, 9, 20, 0.12);
    border-color: rgba(229, 9, 20, 0.25);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.15);
}

.nf-player__ep-card-num {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    min-width: 24px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.nf-player__ep-card.active .nf-player__ep-card-num {
    color: var(--nf-red);
}

/* Image Thumb Wrap and Play Button Overlay */
.nf-player__ep-card-thumb-wrap {
    position: relative;
    width: 106px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.nf-player__ep-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nf-player__ep-card-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nf-player__ep-card:hover .nf-player__ep-card-thumb {
    transform: scale(1.08);
}

.nf-player__ep-card:hover .nf-player__ep-card-play-overlay {
    opacity: 1;
}

.nf-player__ep-card.active .nf-player__ep-card-play-overlay {
    opacity: 1;
    background: rgba(229, 9, 20, 0.3);
}

/* Watch-progress bar overlaid on the episode thumbnail */
.nf-player__ep-card-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.nf-player__ep-card-progress-fill {
    height: 100%;
    background: var(--nf-red, #e50914);
    transition: width 0.3s ease;
}

.nf-player__ep-card-info {
    flex: 1;
    min-width: 0;
}

.nf-player__ep-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--nf-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nf-player__ep-card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* ---------- PiP Indicator ---------- */
.nf-player__pip-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 22px 36px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    z-index: 25;
    display: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* ---------- Hide Cursor on Idle ---------- */
.hide-cursor,
.hide-cursor * {
    cursor: none !important;
}

/* ---------- Speed Indicator Toast ---------- */
.nf-player__speed-indicator {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    transform: translateX(-50%) translateY(-8px);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    letter-spacing: 0.5px;
}

.nf-player__speed-indicator.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- Volume Indicator ---------- */
.nf-player__volume-indicator {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.nf-player__volume-indicator.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nf-player__volume-bar {
    width: 110px;
    height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 3px;
    overflow: hidden;
}

.nf-player__volume-bar-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.15s ease;
}

/* ---------- Brightness Indicator (mobile swipe) ---------- */
.nf-player__brightness-indicator {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.nf-player__brightness-indicator.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nf-player__brightness-indicator span {
    font-size: 13px;
    font-weight: 700;
    min-width: 34px;
    letter-spacing: 0.5px;
}

.nf-player__brightness-bar {
    width: 110px;
    height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 3px;
    overflow: hidden;
}

.nf-player__brightness-bar-fill {
    height: 100%;
    background: #f5c518;
    border-radius: 3px;
    transition: width 0.15s ease;
}

/* ---------- Lock Overlay (SDK-style tap to unlock) ---------- */
.nf-player__lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: #fff;
    z-index: 40;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.nf-player__lock-overlay svg {
    width: 40px;
    height: 40px;
}

.nf-player__lock-overlay.active {
    display: flex;
}

.nf-player__lock-overlay.pulse {
    animation: nfLockPulse 0.5s ease;
}

@keyframes nfLockPulse {
    0%   { transform: translate(-50%, -50%) scale(1); }
    50%  { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* ---------- Mobile-Only Control Buttons ---------- */
.nf-player__mobile-lock-btn {
    display: none !important;
}

.nf-player__mobile-cloud-btn {
    display: none !important;
}

/* Cloud button in controls-right should be visible on desktop */
.nf-player__controls-right #cloudBtnDesktop {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* ---------- Mobile Responsive Player ---------- */
@media (max-width: 768px) {
    .nf-player__top {
        padding: 10px 10px 20px;
    }

    .nf-player__mobile-lock-btn,
    .nf-player__mobile-cloud-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .nf-player__lock-overlay {
        width: 72px;
        height: 72px;
    }


    .nf-player__bottom {
        padding: 80px 12px 10px;
    }

    .nf-player__info {
        margin-bottom: 4px;
        max-width: 55vw;
    }

    .nf-player__logo {
        max-height: 30px;
        max-width: 120px;
        margin-bottom: 4px;
    }

    .nf-player__show-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nf-player__meta-text {
        font-size: 11px;
    }

    .nf-player__ep-title {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nf-player__overview {
        display: none;
    }

    .nf-player__ctrl-btn {
        padding: 8px;
    }

    .nf-player__ctrl-btn svg {
        width: 26px;
        height: 26px;
    }

    .nf-player__ctrl-btn--small svg {
        width: 20px;
        height: 20px;
    }

    .nf-player__text-btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    .nf-player__text-btn svg {
        width: 20px;
        height: 20px;
    }

    .nf-player__time {
        font-size: 12px;
        padding: 0 6px;
    }

    .nf-player__skip-btn {
        bottom: 80px;
        right: 12px;
        padding: 8px 20px;
        font-size: 14px;
    }

    .nf-player__skip-btn--ad {
        bottom: 124px;
    }


    .nf-player__next-card {
        bottom: 80px;
        right: 12px;
        width: 250px;
    }

    .nf-player__drawer,
    .nf-player__episodes-drawer {
        width: 100%;
        max-width: 100vw;
        border-left: none;
        /* Bottom sheet on phone */
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        max-height: 85vh;
        border-top: 1px solid rgba(255,255,255,.08);
        border-radius: 18px 18px 0 0;
        animation: nfDrawerSheetUp 0.35s cubic-bezier(.4,0,.2,1);
    }
    @keyframes nfDrawerSheetUp {
        from { transform: translateY(40px); opacity: 0; }
        to   { transform: translateY(0);    opacity: 1; }
    }

    .nf-player__speed-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .nf-player__speed-btn {
        padding: 10px 4px;
        font-size: 13px;
    }

    .nf-player__back-btn {
        width: 44px;
        height: 44px;
        padding: 10px;
        margin-left: -10px;
    }

    .nf-player__back-btn svg {
        width: 28px;
        height: 28px;
    }

    .nf-player__center-icon {
        width: 72px;
        height: 72px;
    }

    .nf-player__center-icon svg {
        width: 34px;
        height: 34px;
    }

    /* Mobile bottom control bar redesign: larger touch targets */
    .nf-player__controls-row {
        gap: 4px;
        align-items: center;
    }

    .nf-player__ctrl-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }

    .nf-player__ctrl-btn--small {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
    }

    /* Emphasized primary play/pause button */
    .nf-player__ctrl-btn#playPauseBtn {
        min-width: 56px;
        min-height: 56px;
        margin-right: 4px;
    }

    .nf-player__ctrl-btn#playPauseBtn svg {
        width: 32px;
        height: 32px;
    }

    .nf-player__controls-left,
    .nf-player__controls-right {
        gap: 2px;
    }

    .nf-player__text-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .nf-player__volume-group:hover .nf-player__volume-slider {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .nf-player__controls-row {
        gap: 0;
        justify-content: space-between;
    }

    .nf-player__controls-left,
    .nf-player__controls-right {
        gap: 0;
    }

    .nf-player__text-btn span {
        display: none;
    }

    .nf-player__text-btn {
        padding: 8px;
    }
    
    .nf-player__time {
        display: none; /* Hide on very small screens to save space */
    }
    
    .nf-player__volume-group {
        display: none; /* Mobile volume is controlled by physical buttons or gestures */
    }
    
    .nf-player__bottom {
        padding: 60px 8px 8px;
    }
}

/* ---------- Mobile Search Bar ---------- */
.nf-mobile-search {
    display: none; /* hidden on desktop */
    align-items: center;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    margin: 20px 4% 4px;
    padding: 10px 14px;
    position: relative;
    z-index: 10;
}

.nf-mobile-search__icon {
    width: 20px;
    height: 20px;
    color: var(--nf-gray-light);
    margin-right: 10px;
    flex-shrink: 0;
}

.nf-mobile-search__input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    width: 100%;
    outline: none;
    font-family: inherit;
    -webkit-appearance: none;
}

.nf-mobile-search__input::placeholder {
    color: rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
    .nf-mobile-search {
        display: flex;
    }
}

/* ---------- Remote Banner ---------- */
.nf-remote-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nf-red);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
    z-index: 99999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nf-remote-banner.active {
    display: block;
}
/* TV Navigation Focus Styles */
.focusable:focus, .nf-nav-link:focus, .nf-btn:focus, .nf-notif-btn:focus, .nf-player__server-card:focus, .nf-player__btn:focus, .nf-slider__item:focus {
    outline: 4px solid #fff;
    outline-offset: -2px;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
    transition: all 0.2s ease;
    z-index: 100;
}
.nf-player__tab:focus {
    outline: 3px solid #fff;
}

/* Iframe Mode Styles */
.nf-player.iframe-mode .nf-player__bottom,
.nf-player.iframe-mode .nf-player__center-icon {
    display: none !important;
}
.nf-player.iframe-mode .nf-player__controls {
    pointer-events: none;
}
.nf-player.iframe-mode .nf-player__controls > * {
    pointer-events: auto;
}
/* Edge detectors to wake up UI when hovering edges of iframe */
.nf-player.iframe-mode .nf-player__edge {
    position: absolute;
    z-index: 100;
    pointer-events: auto;
}
.nf-player.iframe-mode .nf-player__edge.top { top: 0; left: 0; right: 0; height: 30px; }
.nf-player.iframe-mode .nf-player__edge.bottom { bottom: 0; left: 0; right: 0; height: 30px; }
.nf-player.iframe-mode .nf-player__edge.left { top: 0; bottom: 0; left: 0; width: 30px; }
.nf-player.iframe-mode .nf-player__edge.right { top: 0; bottom: 0; right: 0; width: 30px; }

/* ==========================================================================
   Mobile Homepage Polish
   ========================================================================== */
@media (max-width: 768px) {
    .nf-card {
        flex: 0 0 calc((100% - 12px) / 2.5);
        height: 350px;
    }
    .nf-footer {
        padding: 20px var(--nf-row-padding) 30px;
        margin-top: 10px;
    }
    .nf-footer__social {
        gap: 14px;
        margin-bottom: 14px;
    }
    .nf-footer__links {
        gap: 8px;
        margin-bottom: 16px;
    }
    .nf-slider__track {
        gap: 4px;
        padding-left: var(--nf-row-padding);
        padding-right: var(--nf-row-padding);
    }
    .content-section.active {
        padding-top: 0;
    }
    #homeRows > .nf-row:first-child {
        margin-top: 0;
    }
}
@media (max-width: 480px) {
    .nf-card {
        flex: 0 0 calc((100% - 6px) / 2);
        height: 320px;
    }
    .nf-continue-card {
        flex: 0 0 calc((100% - 6px) / 2);
        height: 320px;
    }
    .nf-slider__track {
        gap: 3px;
    }
    .nf-row {
        margin-bottom: 4vw;
    }
}
@media (max-width: 380px) {
    .nf-next-watch {
        min-height: 340px;
        height: 48vh;
    }
    .nf-next-watch__meta {
        margin-top: 48vh;
    }
    .nf-next-watch__active-info {
        padding: 30px var(--nf-row-padding) 50px;
    }
    .nf-next-watch__title-text {
        font-size: clamp(18px, 7vw, 28px);
        margin-bottom: 6px;
    }
    .nf-next-watch__badge {
        font-size: 8px;
        padding: 1px 4px;
    }
    .nf-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    .nf-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Server Section Titles in Settings Drawer */
.nf-player__server-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin: 16px 4px 10px;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    font-family: inherit;
}

/* ==========================================================================
   NETFLIX PROFILE SELECTION & MANAGEMENT
   ========================================================================== */
.nf-profile-selection-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #141414;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    color: #fff;
    animation: nfFadeIn 0.35s ease;
}

.nf-profile-selection-container {
    text-align: center;
    max-width: 800px;
    width: 90%;
}

.nf-profile-selection-container h1 {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.nf-profile-list {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2vw;
    margin-bottom: 48px;
}

.nf-profile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: clamp(100px, 12vw, 150px);
    position: relative;
}

.nf-profile-avatar-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 3.5px solid transparent;
    transition: border-color 0.25s ease, transform 0.25s ease;
    background: #2b2b2b;
}

.nf-profile-item:hover .nf-profile-avatar-wrap {
    border-color: #fff;
    transform: scale(1.06);
}

.nf-profile-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nf-profile-item span {
    margin-top: 15px;
    font-size: clamp(14px, 1.6vw, 18px);
    color: var(--nf-gray-light);
    transition: color 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.nf-profile-item:hover span {
    color: #fff;
}

/* Edit Overlay Pencil */
.nf-profile-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 4px;
}

.nf-profile-item.manage-mode .nf-profile-edit-overlay {
    opacity: 1;
}

.nf-profile-edit-overlay svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* Wobble animation for manage mode */
@keyframes nfProfileWobble {
    0% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
    100% { transform: rotate(-1deg); }
}

.nf-profile-item.manage-mode .nf-profile-avatar-wrap {
    animation: nfProfileWobble 0.25s infinite alternate ease-in-out;
}

/* Add profile button */
.nf-profile-item--add .nf-profile-avatar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nf-profile-item--add .nf-profile-avatar-wrap svg {
    width: 40%;
    height: 40%;
    fill: var(--nf-gray);
    transition: fill 0.25s ease;
}

.nf-profile-item--add:hover .nf-profile-avatar-wrap {
    background: #fff;
}
.nf-profile-item--add:hover .nf-profile-avatar-wrap svg {
    fill: #000;
}

.nf-profile-manage-btn {
    background: transparent;
    border: 1px solid var(--nf-gray);
    color: var(--nf-gray);
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    cursor: pointer;
}

.nf-profile-manage-btn:hover,
.nf-profile-manage-btn.active {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,0.05);
}

/* Edit / Add Profile Modals */
.nf-profile-edit-modal,
.nf-profile-avatar-picker {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
}

.nf-profile-edit-container,
.nf-profile-avatar-picker-container {
    background: #181818;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 40px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    animation: nfDrawerSlideIn 0.3s cubic-bezier(.4,0,.2,1);
}

.nf-profile-edit-container h2,
.nf-profile-avatar-picker-container h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.nf-profile-edit-body {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    align-items: center;
}

.nf-profile-edit-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.nf-profile-edit-avatar-section img {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    object-fit: cover;
}

.nf-profile-edit-avatar-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}

.nf-profile-edit-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nf-profile-edit-info-section input[type="text"] {
    background: #444;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 4px;
    outline: none;
}

.nf-profile-edit-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nf-profile-edit-checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--nf-red);
}

.nf-profile-edit-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

/* Avatar Picker Grid */
.nf-profile-avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 6px;
}

.nf-profile-avatar-option {
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.nf-profile-avatar-option:hover {
    border-color: #fff;
    transform: scale(1.05);
}

.nf-profile-avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Profile selection & management on mobile ---------- */
@media (max-width: 600px) {
    .nf-profile-selection-screen {
        overflow-y: auto;
        align-items: flex-start;
        justify-content: center;
        padding: 48px 0 48px;
    }
    .nf-profile-selection-container {
        width: 100%;
        max-width: 100%;
        padding: 0 12px;
    }
    .nf-profile-selection-container h1 {
        font-size: 28px;
        margin-bottom: 24px;
    }
    .nf-profile-list {
        gap: 8px 6px;
        margin-bottom: 32px;
    }
    .nf-profile-item {
        width: clamp(72px, 26vw, 120px);
    }
    .nf-profile-item span {
        margin-top: 10px;
        font-size: 13px;
    }
    .nf-profile-edit-container,
    .nf-profile-avatar-picker-container {
        width: 96%;
        max-height: 92vh;
        overflow-y: auto;
        padding: 20px 16px;
    }
    .nf-profile-edit-body {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .nf-profile-edit-info-section {
        width: 100%;
        align-items: center;
    }
    .nf-profile-edit-info-section input[type="text"] {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
    .nf-profile-edit-footer {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nf-profile-avatar-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

/* ---------- Settings Modal ---------- */
.nf-settings-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
}

.nf-settings-modal__container {
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    width: min(720px, 94vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: nfDrawerSlideIn 0.3s cubic-bezier(.4, 0, .2, 1);
}

.nf-settings-modal__container--sm {
    max-width: 420px;
    padding: 32px;
    align-items: center;
    text-align: center;
}

.nf-settings-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nf-settings-modal__header h2 {
    font-size: 24px;
    font-weight: 600;
}

.nf-settings-modal__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nf-settings-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nf-settings-modal__body {
    overflow-y: auto;
    padding: 8px 24px 24px;
    flex: 1;
}

.nf-settings-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
}

.nf-settings-profile {
    color: #aaa;
    font-size: 13px;
    margin: 14px 0 4px;
}

.nf-settings-section {
    margin-top: 20px;
}

.nf-settings-section__title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.nf-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nf-settings-row--stack {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.nf-settings-row__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nf-settings-row__label span {
    font-size: 14px;
    font-weight: 500;
}

.nf-settings-row__label small {
    color: #aaa;
    font-size: 12px;
}

.nf-settings-select {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    min-width: 170px;
    flex-shrink: 0;
}

.nf-settings-value {
    color: #aaa;
    font-size: 13px;
    align-self: flex-end;
}

.nf-sync-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nf-sync-code {
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #e50914;
    background: rgba(229, 9, 20, 0.12);
    border: 1px dashed rgba(229, 9, 20, 0.45);
    border-radius: 6px;
    padding: 8px 14px;
    min-width: 120px;
    text-align: center;
}

.nf-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.nf-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nf-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #3a3a3a;
    border-radius: 26px;
    transition: .2s;
}

.nf-switch__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}

.nf-switch input:checked + .nf-switch__slider {
    background: var(--nf-red, #e50914);
}

.nf-switch input:checked + .nf-switch__slider::before {
    transform: translateX(20px);
}

.nf-swatch-row {
    display: flex;
    gap: 10px;
}

.nf-swatch-row button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.nf-swatch-row button.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

/* Subtitle size live preview (mirrors the player's ::cue look) */
.nf-sub-preview {
    position: relative;
    margin-top: 14px;
    padding: 20px 18px 18px;
    border-radius: 10px;
    background-color: #0b0e1a;
    background-image:
        radial-gradient(120% 80% at 20% 0%, rgba(42, 48, 100, 0.5), rgba(0, 0, 0, 0.25) 60%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 104px;
    text-align: center;
    overflow: hidden;
}

.nf-sub-preview__cue {
    display: block;
    max-width: 100%;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
    color: #fff;
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.95),
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 4px 8px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 10px;
    border-radius: 4px;
}

.nf-sub-preview__size {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

.nf-settings-subhead {
    font-size: 14px;
    font-weight: 600;
    color: #e5e5e5;
    margin: 16px 0 8px;
}

.nf-settings-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.nf-settings-history__item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #222;
    border-radius: 4px;
    padding: 8px 10px;
}

.nf-settings-history__item img {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 2px;
}

.nf-settings-history__item-info {
    flex: 1;
    min-width: 0;
}

.nf-settings-history__item-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nf-settings-history__item-meta {
    font-size: 11px;
    color: #aaa;
}

.nf-settings-history__item-remove {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.nf-settings-history__item-remove:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nf-settings-history__empty {
    color: #aaa;
    font-size: 13px;
    padding: 8px 0;
}

.nf-btn--danger {
    background: #b9090b;
    color: #fff;
}

.nf-settings-pin {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0 4px;
}

.nf-settings-pin input,
.nf-settings-modal__pin-input {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 6px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.nf-settings-modal__pin-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.nf-settings-modal__pin-sub {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
}

.nf-settings-modal__pin-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

@media (max-width: 768px) {
    .nf-settings-modal__body {
        padding: 8px 14px 20px;
    }
    .nf-settings-row {
        flex-wrap: wrap;
        padding: 12px 0;
    }
    .nf-settings-select {
        min-width: 0;
        width: 100%;
    }
    .nf-settings-modal__container {
        max-height: 94vh;
    }
    .nf-settings-modal__container--sm {
        width: 92vw;
        padding: 24px 18px;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Popular Franchises Row — .nf-franchise-card wraps the .nf-card with a
   name label above it
   ========================================================================== */
.nf-franchise-card {
    flex: 0 0 calc((100% - 30px) / 6);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1399px) { .nf-franchise-card { flex: 0 0 calc((100% - 24px) / 5); } }
@media (max-width: 1099px) { .nf-franchise-card { flex: 0 0 calc((100% - 18px) / 4); } }
@media (max-width: 799px) { .nf-franchise-card { flex: 0 0 calc((100% - 12px) / 2.5); } }
@media (max-width: 499px) { .nf-franchise-card { flex: 0 0 calc((100% - 6px) / 2); } }

@media (min-width: 800px) {
    .nf-slider__track .nf-franchise-card:hover {
        flex: 0 0 calc(18% - 6px);
        transition-delay: 0.2s;
    }
}

.nf-franchise-card__label {
    font-family: var(--nf-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--nf-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px 8px;
    line-height: 1.2;
}

/* Inner card fills the wrapper width; keep its flex sizing from affecting it */
.nf-slider__track .nf-franchise-card .nf-card,
.nf-slider__track:hover .nf-franchise-card .nf-card,
.nf-slider__track .nf-franchise-card .nf-card:hover {
    flex: none;
    width: 100%;
}

.nf-franchise-card .nf-card {
    height: 350px;
}

@media (max-width: 1399px) { .nf-franchise-card .nf-card { height: 320px; } }
@media (max-width: 1099px) { .nf-franchise-card .nf-card { height: 280px; } }
@media (max-width: 799px) { .nf-franchise-card .nf-card { height: 350px; } }
@media (max-width: 499px) { .nf-franchise-card .nf-card { height: 320px; } }

/* ==========================================================================
   Franchise Detail Page
   ========================================================================== */
.nf-franchise-page {
    padding-top: var(--nf-header-h);
    min-height: 100vh;
    background: var(--nf-black);
}

.nf-franchise-page__hero {
    position: relative;
    width: 100%;
    height: 55vh;
    min-height: 380px;
    max-height: 600px;
    overflow: hidden;
}

.nf-franchise-page__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1);
}

.nf-franchise-page__back {
    position: absolute;
    top: 20px;
    left: var(--nf-row-padding);
    z-index: 8;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(20,20,20,.5);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nf-franchise-page__back:hover {
    background: rgba(255,255,255,.15);
}

.nf-franchise-page__back svg {
    width: 24px;
    height: 24px;
}

.nf-franchise-page__hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, var(--nf-black) 0%, rgba(20,20,20,.7) 40%, rgba(20,20,20,.2) 70%, transparent 100%),
        linear-gradient(90deg, rgba(20,20,20,.6) 0%, transparent 50%);
}

.nf-franchise-page__hero-info {
    position: absolute;
    bottom: 40px;
    left: var(--nf-row-padding);
    right: var(--nf-row-padding);
    z-index: 5;
    max-width: 700px;
}

.nf-franchise-page__title {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
    letter-spacing: -0.02em;
}

.nf-franchise-page__desc {
    font-size: clamp(13px, 1.2vw, 16px);
    color: rgba(255,255,255,.85);
    line-height: 1.5;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-franchise-page__content {
    padding: 0 var(--nf-row-padding);
    margin-top: -40px;
    position: relative;
    z-index: 6;
}

.nf-franchise-page__section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--nf-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.nf-franchise-page__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 60px;
}

.nf-franchise-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--nf-radius-lg);
    cursor: pointer;
    transition: all 0.25s ease;
}

.nf-franchise-item:hover {
    background: rgba(255,255,255,.08);
    transform: translateX(6px);
    border-color: rgba(255,255,255,.12);
}

.nf-franchise-item__num {
    font-size: 20px;
    font-weight: 800;
    color: var(--nf-gray);
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.nf-franchise-item__poster {
    width: 70px;
    height: 100px;
    border-radius: var(--nf-radius);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.nf-franchise-item__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nf-franchise-item__info {
    flex: 1;
    min-width: 0;
}

.nf-franchise-item__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--nf-white);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nf-franchise-item__meta {
    font-size: 12px;
    color: var(--nf-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nf-franchise-item__type {
    padding: 2px 6px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.nf-franchise-item__play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.nf-franchise-item:hover .nf-franchise-item__play {
    background: var(--nf-red);
    border-color: var(--nf-red);
}

.nf-franchise-item__play svg {
    width: 18px;
    height: 18px;
}

/* Mobile */
@media (max-width: 768px) {
    .nf-franchise-page__hero {
        height: 40vh;
        min-height: 280px;
    }
    .nf-franchise-page__hero-info {
        bottom: 24px;
    }
    .nf-franchise-page__title {
        font-size: clamp(22px, 6vw, 36px);
    }
    .nf-franchise-item {
        padding: 12px;
        gap: 12px;
    }
    .nf-franchise-item__poster {
        width: 55px;
        height: 80px;
    }
    .nf-franchise-item__num {
        font-size: 16px;
        min-width: 28px;
    }
}

