/* ============================================================
   JuicedFlix Theme — Main Stylesheet
   Palette from juicedflix.com:
     bg-main   #160423  deep dark purple
     bg-card   #2A0839  dark purple
     bg-header #0F031A  near-black purple
     text      #c2a878  warm golden tan
     heading   #e8ddbb  cream / gold
     accent    #DDD396  yellow-gold
     danger    #AF0D41  crimson
   Font: Nunito 400/500/600/700
============================================================ */

/* ── CSS variables ──────────────────────────────────────── */
:root {
    --bg-main:      #160423;
    --bg-card:      #2A0839;
    --bg-header:    #0F031A;
    --bg-footer:    #000000;
    --bg-input:     #1e0530;
    --bg-modal:     #1a0530;
    --text:         #c2a878;
    --text-muted:   rgba(194,168,120,.55);
    --text-heading: #e8ddbb;
    --accent:       #DDD396;
    --accent-hover: #ede8a0;
    --danger:       #AF0D41;
    --border:       rgba(221,211,150,.15);
    --shadow:       0 4px 24px rgba(0,0,0,.55);
    --radius:       8px;
    --radius-lg:    12px;
    --font:         'Nunito', sans-serif;
    --header-h:     64px;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-main);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

ul, ol { list-style: none; }

/* ── Utility ─────────────────────────────────────────────── */
.jf-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-header); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   HEADER
============================================================ */
.jf-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: linear-gradient(to bottom, var(--bg-header) 70%, transparent);
    z-index: 100;
    transition: background .3s;
}
.jf-header.jf-header--solid {
    background: var(--bg-header);
    box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.jf-header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--header-h);
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
}
/* Logo container (now a <div> so the_custom_logo()'s own <a> isn't nested) */
.jf-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    max-height: 40px;
    overflow: hidden;
}

/* WordPress custom logo: a.custom-logo-link > img.custom-logo */
.jf-header__logo a,
.jf-header__logo .custom-logo-link,
.jf-header__logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    max-height: 40px;
}
.jf-header__logo img,
.jf-header__logo .custom-logo {
    max-height: 40px !important;
    max-width: 200px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
}
.jf-header__logo-text { color: var(--accent); font-size: 20px; font-weight: 700; }

.jf-header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}
.jf-nav__link {
    color: rgba(232,221,187,.7);
    font-weight: 500;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
}
.jf-nav__link:hover,
.jf-nav__link--active {
    color: var(--text-heading);
    background: rgba(255,255,255,.07);
}

.jf-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.jf-header__icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, background .2s;
}
.jf-header__icon-btn svg { width: 22px; height: 22px; }
.jf-header__icon-btn:hover {
    color: var(--text-heading);
    background: rgba(255,255,255,.1);
}

/* User menu */
.jf-user-menu { position: relative; }
.jf-user-menu__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 200;
}
.jf-user-menu:hover .jf-user-menu__dropdown,
.jf-user-menu.open .jf-user-menu__dropdown { display: block; }
.jf-user-menu__info {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.jf-user-menu__info strong { color: var(--text-heading); font-size: 14px; }
.jf-user-menu__tier {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
}
.jf-user-menu__tier--free    { background: rgba(194,168,120,.15); color: var(--text); }
.jf-user-menu__tier--premium { background: rgba(221,211,150,.2);  color: var(--accent); }
.jf-user-menu__item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text);
    transition: background .15s, color .15s;
}
.jf-user-menu__item:hover { background: rgba(255,255,255,.07); color: var(--text-heading); }
.jf-user-menu__item--logout { color: var(--danger); }
.jf-user-menu__item--logout:hover { background: rgba(175,13,65,.15); color: var(--danger); }

/* Mobile hamburger */
.jf-header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.jf-header__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s;
}

/* Search bar */
.jf-search-bar {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: none;
    z-index: 99;
}
.jf-search-bar.open { display: block; }
.jf-search-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 680px;
    margin: 0 auto;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 16px;
}
.jf-search-bar__icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .6; }
.jf-search-bar__input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-heading);
    font-family: var(--font);
    font-size: 15px;
}
.jf-search-bar__input::placeholder { color: var(--text-muted); }
.jf-search-bar__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    padding: 0 4px;
    transition: color .2s;
}
.jf-search-bar__close:hover { color: var(--text-heading); }

.jf-search-results {
    max-width: 680px;
    margin: 12px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.jf-search-result-item {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: background .2s;
}
.jf-search-result-item:hover { background: rgba(42,8,57,.8); }
.jf-search-result-item img  { width: 44px; height: 60px; object-fit: cover; flex-shrink: 0; }
.jf-search-result-item__info { padding: 6px 8px 6px 0; font-size: 13px; }
.jf-search-result-item__name { color: var(--text-heading); font-weight: 600; }
.jf-search-result-item__year { color: var(--text-muted); font-size: 12px; }

/* ============================================================
   MAIN & LAYOUT
============================================================ */
.jf-main { padding-top: var(--header-h); min-height: calc(100vh - 200px); }

/* ============================================================
   BUTTONS
============================================================ */
.jf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    border: none;
    transition: transform .15s, box-shadow .15s, background .2s, color .2s;
    white-space: nowrap;
}
.jf-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.jf-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.jf-btn:active { transform: none; }

.jf-btn--primary {
    background: var(--accent);
    color: var(--bg-header);
}
.jf-btn--primary:hover { background: var(--accent-hover); color: var(--bg-header); }

.jf-btn--secondary {
    background: rgba(255,255,255,.12);
    color: var(--text-heading);
    border: 1px solid var(--border);
}
.jf-btn--secondary:hover { background: rgba(255,255,255,.18); color: var(--text-heading); }

.jf-btn--outline {
    background: transparent;
    color: var(--text-heading);
    border: 1px solid var(--border);
}
.jf-btn--outline:hover { background: rgba(255,255,255,.08); color: var(--text-heading); }

.jf-btn--accent { background: var(--accent); color: var(--bg-header); }

.jf-btn--sm  { padding: 6px 14px; font-size: 13px; }
.jf-btn--lg  { padding: 13px 28px; font-size: 15px; }

/* ============================================================
   BADGE
============================================================ */
.jf-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}

.jf-genre-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(221,211,150,.1);
    color: var(--accent);
    border: 1px solid rgba(221,211,150,.2);
    transition: background .2s, color .2s;
}
a.jf-genre-tag:hover { background: rgba(221,211,150,.2); color: var(--accent-hover); }
.jf-genre-tag--sm { font-size: 11px; padding: 3px 10px; }

/* ============================================================
   HERO
============================================================ */
.jf-hero {
    position: relative;
    height: 85vh;
    min-height: 520px;
    max-height: 860px;
    background-color: var(--bg-card);
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.jf-hero__grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(22,4,35,.1) 10%,
        rgba(22,4,35,.3) 30%,
        rgba(22,4,35,.8) 80%,
        var(--bg-main) 100%
    );
}
.jf-hero__content {
    position: relative;
    z-index: 1;
    padding-bottom: 56px;
    max-width: 680px;
}
.jf-hero__genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.jf-hero__title {
    font-size: clamp(28px, 5vw, 52px);
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
    margin-bottom: 14px;
}
.jf-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    color: rgba(194,168,120,.9);
    font-size: 14px;
}
.jf-hero__meta .jf-badge {
    color: rgba(232,221,187,.9);
    border-color: rgba(232,221,187,.5);
}
.jf-hero__overview {
    font-size: 15px;
    color: rgba(232,221,187,1);
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 560px;
}
.jf-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   SECTIONS & SCROLL ROWS
============================================================ */
.jf-section {
    padding: 36px 0 8px;
}
.jf-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 0 24px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.jf-section__title {
    font-size: 18px;
    color: var(--text-heading);
    font-weight: 700;
}
.jf-section__see-all {
    font-size: 13px;
    font-weight: 600;
    color: rgba(194,168,120,.75);
    white-space: nowrap;
}
.jf-section__see-all:hover { color: var(--accent); }

.jf-scroll-wrap {
    position: relative;
    overflow: hidden;
}
.jf-scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 24px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.jf-scroll-row::-webkit-scrollbar { display: none; }

/* Scroll arrow buttons */
.jf-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(22,4,35,.85);
    border: 1px solid var(--border);
    color: var(--text-heading);
    width: 40px;
    height: 72px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, opacity .2s;
    opacity: 0;
    pointer-events: none;
}
.jf-scroll-wrap:hover .jf-scroll-btn { opacity: 1; pointer-events: auto; }
.jf-scroll-btn:hover { background: rgba(42,8,57,.95); }
.jf-scroll-btn--prev { left: 0;  border-radius: 0 var(--radius) var(--radius) 0; }
.jf-scroll-btn--next { right: 0; border-radius: var(--radius) 0 0 var(--radius); }

/* ============================================================
   MOVIE CARD
============================================================ */
.jf-card {
    flex-shrink: 0;
    width: 180px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.jf-card:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.6);
    z-index: 5;
}
.jf-card__inner { display: block; color: inherit; }
.jf-card__thumb {
    position: relative;
    aspect-ratio: 2/3;
    background: rgba(42,8,57,.5);
    overflow: hidden;
}
.jf-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
    filter: brightness(0.9);
}
.jf-card:hover .jf-card__img { transform: scale(1.05); }

.jf-card__hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22,4,35,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.jf-card:hover .jf-card__hover-overlay { opacity: 1; }
.jf-card__play-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-header);
}
.jf-card__play-icon svg { width: 24px; height: 24px; margin-left: 3px; }

.jf-card__rating {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    background: rgba(0,0,0,.7);
    border-radius: 4px;
    color: var(--text-muted);
    letter-spacing: .05em;
}

.jf-card__body { padding: 10px 12px 14px; }
.jf-card__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.jf-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    align-items: center;
}
.jf-card__lang,
.jf-card__duration {
    display: inline-block;
    padding: 1px 7px;
    border: 1px solid rgba(221,211,150,.25);
    border-radius: 20px;
    font-size: 8px;
    font-weight: 700;
    color: rgba(221,211,150,.7);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.6;
}
.jf-card__excerpt {
    font-size: 11px;
    color: rgba(194,168,120,.85);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Grid card variant */
.jf-card--grid {
    width: auto;
}

/* ============================================================
   MOVIES PAGE — GRID
============================================================ */
.jf-movies-page { padding-top: calc(var(--header-h) + 24px); }

.jf-movies-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.jf-page-title {
    font-size: clamp(22px, 3vw, 32px);
    color: var(--text-heading);
}
.jf-movies-count { color: var(--text-muted); font-weight: 400; }

.jf-filters { display: flex; gap: 10px; flex-wrap: wrap; }

.jf-select {
    appearance: none;
    background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c2a878' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    padding: 8px 36px 8px 12px;
    cursor: pointer;
    transition: border-color .2s;
}
.jf-select:focus { outline: none; border-color: var(--accent); }
.jf-select option { background: var(--bg-card); }

.jf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

/* ── Pagination ──────────────────────────────────────────── */
.jf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 16px 0 40px;
}
.jf-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: background .2s, color .2s;
}
.jf-page-btn:hover { background: rgba(221,211,150,.1); color: var(--text-heading); }
.jf-page-btn--active {
    background: var(--accent);
    color: var(--bg-header);
    border-color: var(--accent);
}
.jf-page-btn--nav { font-size: 18px; }
.jf-page-ellipsis { color: var(--text-muted); padding: 0 4px; align-self: flex-end; }

/* ============================================================
   DETAIL PAGE
============================================================ */
.jf-detail { position: relative; }

.jf-detail__backdrop {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(2px) brightness(.65);
}
.jf-detail__backdrop-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(22,4,35,.3) 0%, var(--bg-main) 70%);
}

.jf-detail__body {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 60px;
}

.jf-detail__layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 56px;
}

.jf-detail__poster-col { flex-shrink: 0; width: 220px; }
.jf-detail__poster {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.jf-detail__info { flex: 1; min-width: 0; }

.jf-detail__breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.jf-detail__breadcrumb a { color: var(--text-muted); }
.jf-detail__breadcrumb a:hover { color: var(--accent); }
.jf-detail__breadcrumb span { color: var(--text); }

.jf-detail__title {
    font-size: clamp(26px, 4vw, 44px);
    margin-bottom: 16px;
}
.jf-detail__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-muted);
}
.jf-meta-item { }
.jf-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
}
.jf-rating svg { flex-shrink: 0; }

.jf-detail__genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.jf-detail__excerpt {
    font-size: 14px;
    font-style: italic;
    line-height: 1.65;
    color: rgba(194,168,120,.9);
    margin-bottom: 10px;
    max-width: 680px;
}
.jf-detail__overview {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(232,221,187,.85);
    margin-bottom: 20px;
    max-width: 680px;
}
.jf-detail__wp-content p {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(232,221,187,.85);
    margin-bottom: 12px;
}
.jf-detail__jf-overview {
    border-top: 1px solid rgba(194,168,120,.15);
    padding-top: 14px;
    margin-top: 4px;
}

.jf-detail__credit {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.jf-detail__credit-label {
    color: var(--text-muted);
    font-weight: 700;
    min-width: 70px;
    flex-shrink: 0;
}
.jf-detail__credit span:last-child { color: var(--text); }

.jf-detail__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Cast */
.jf-detail__cast { padding-top: 0; }
.jf-cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 16px;
}
.jf-cast-card { text-align: center; }
.jf-cast-card__thumb {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    margin-bottom: 8px;
    position: relative;
}
.jf-cast-card__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.15);
    pointer-events: none;
}
.jf-cast-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.jf-cast-card__no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-muted);
}
.jf-cast-card__no-photo svg { width: 40px; height: 40px; }
.jf-cast-card__name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
}
.jf-cast-card__role {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   404
============================================================ */
.jf-404__code {
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 700;
    color: var(--bg-card);
    line-height: 1;
    margin-bottom: 16px;
}
.jf-404__title { font-size: 28px; margin-bottom: 10px; }
.jf-404__text  { color: var(--text-muted); margin-bottom: 32px; }

/* ============================================================
   EMPTY STATE
============================================================ */
.jf-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.jf-empty h2 { font-size: 20px; margin: 20px 0 10px; color: var(--text); }
.jf-empty p  { margin-bottom: 24px; }

/* ============================================================
   MODAL
============================================================ */
.jf-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.jf-modal[hidden] { display: none; }
.jf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.jf-modal__box {
    position: relative;
    z-index: 1;
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    animation: jf-slide-up .25s ease;
}
@keyframes jf-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.jf-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 28px;
    line-height: 1;
    transition: color .2s;
}
.jf-modal__close:hover { color: var(--text-heading); }
.jf-modal__icon {
    width: 64px;
    height: 64px;
    background: rgba(221,211,150,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
}
.jf-modal__icon svg { width: 32px; height: 32px; }
.jf-modal__box h2  { font-size: 22px; margin-bottom: 10px; }
.jf-modal__box p   { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; line-height: 1.6; }
.jf-modal__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   REGISTER PAGE
============================================================ */
.jf-register-wrap {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.jf-register-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow);
}
.jf-register-icon {
    width: 64px;
    height: 64px;
    background: rgba(221,211,150,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.jf-register-icon svg { width: 32px; height: 32px; color: var(--accent); }
.jf-register-icon--success { background: rgba(70,180,80,.12); }
.jf-register-icon--success svg { color: #46b450; }
.jf-register-title {
    font-size: 26px;
    margin-bottom: 10px;
}
.jf-register-sub {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 28px;
}
.jf-register-sub strong { color: var(--text); }
.jf-register-error {
    background: rgba(175,13,65,.15);
    border: 1px solid rgba(175,13,65,.4);
    color: #f08090;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 18px;
    text-align: left;
}
.jf-register-error a { color: var(--accent); }
.jf-register-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.jf-register-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}
.jf-register-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
}
.jf-register-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-heading);
    width: 100%;
    transition: border-color .2s;
    outline: none;
}
.jf-register-input::placeholder { color: var(--text-muted); }
.jf-register-input:focus { border-color: rgba(221,211,150,.5); }
.jf-register-submit { width: 100%; justify-content: center; }
.jf-register-signin {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.jf-register-signin a { color: var(--accent); }

@media (max-width: 480px) {
    .jf-register-box { padding: 36px 24px; }
}

/* ============================================================
   FOOTER
============================================================ */
.jf-footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border);
    padding: 40px 0;        /* horizontal padding removed — children handle their own */
    margin-top: 60px;
}
.jf-footer__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;        /* sole source of horizontal padding for the bottom bar */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}
.jf-footer__brand { display: flex; flex-direction: column; gap: 6px; }
.jf-footer__logo  { font-size: 18px; font-weight: 700; color: var(--accent); }
.jf-footer__tagline { font-size: 12px; color: var(--text-muted); max-width: 280px; }
.jf-footer__nav { display: flex; gap: 20px; flex-wrap: wrap; }
.jf-footer__nav a { font-size: 13px; color: var(--text-muted); }
.jf-footer__nav a:hover { color: var(--accent); }
.jf-footer__copy { font-size: 12px; color: var(--text-muted); width: 100%; text-align: right; }

/* Footer widget row */
.jf-footer__widgets {
    border-bottom: 1px solid var(--border);
    padding: 48px 0 40px;   /* horizontal padding removed — .jf-container inside handles it */
}
.jf-footer__widget-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.jf-footer__widget-col { min-width: 0; }
.jf-footer-widget { color: var(--text); font-size: 14px; line-height: 1.7; }
.jf-footer-widget__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.jf-footer-widget p  { margin-bottom: .6em; color: var(--text); }
.jf-footer-widget a  { color: var(--accent); }
.jf-footer-widget a:hover { color: var(--accent-hover); }
.jf-footer-widget ul { display: flex; flex-direction: column; gap: 6px; }
.jf-footer-widget ul li a { color: var(--text); font-size: 13px; }
.jf-footer-widget ul li a:hover { color: var(--accent); }

/* ============================================================
   PAGE CONTENT (generic pages)
============================================================ */
.jf-page-content {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 60px;
    max-width: 800px;
}
.jf-page-content .jf-page-title { font-size: 32px; margin-bottom: 24px; }
.jf-page-content .jf-page-body  { color: var(--text); line-height: 1.75; }
.jf-page-content .jf-page-body p { margin-bottom: 16px; }
.jf-page-content .jf-page-body a { color: var(--accent); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
    .jf-detail__layout { flex-direction: column; }
    /* poster stays 220px on all screen sizes — no width override here */

    .jf-header__nav { display: none; }
    .jf-header__hamburger { display: flex; }
    .jf-header__auth-register { display: none; }
    .jf-header__auth-signin  { display: none; } /* shown inside hamburger menu instead */
    .jf-header__nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--bg-header);
        padding: 16px;
        border-bottom: 1px solid var(--border);
    }
    .jf-nav__mobile-auth {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
}

/* Hide mobile-only auth block on desktop only; visible inside open hamburger nav on mobile */
@media (min-width: 901px) {
    .jf-nav__mobile-auth { display: none; }
}

/* ── Browse by Language page ─────────────────────────────────────────────────── */
.jf-lang-page { padding: 60px 24px 100px; max-width: 860px; margin: 0 auto; }
.jf-lang-page .jf-page-title { margin-bottom: 10px; }
.jf-lang-page__sub {
    color: rgba(194,168,120,.65);
    font-size: 0.95rem;
    margin-bottom: 40px;
}
.jf-lang-page__empty { color: rgba(194,168,120,.5); font-style: italic; }
.jf-lang-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.jf-lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    background: #2A0839;
    border: 1px solid rgba(221,211,150,.2);
    border-radius: 30px;
    color: #e8ddbb;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}
.jf-lang-pill:hover {
    border-color: #DDD396;
    background: rgba(221,211,150,.1);
    color: #e8ddbb;
    text-decoration: none;
}
.jf-lang-pill__count {
    background: rgba(221,211,150,.12);
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 0.78rem;
    color: rgba(221,211,150,.65);
    font-weight: 700;
}

/* ── Language filter clear link on movies page ─────────────────────────────── */
.jf-lang-clear {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(194,168,120,.6);
    text-decoration: none;
    margin-left: 10px;
    vertical-align: middle;
    border: 1px solid rgba(194,168,120,.3);
    border-radius: 20px;
    padding: 3px 10px;
    transition: color .2s, border-color .2s;
}
.jf-lang-clear:hover { color: #e8ddbb; border-color: #DDD396; text-decoration: none; }

@media (max-width: 600px) {
    .jf-card { width: 150px; }           /* scroll-row cards keep fixed width */
    .jf-grid .jf-card { width: 100%; }  /* grid-page cards fill their column */
    .jf-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .jf-hero { height: 60vh; }
    .jf-hero__actions { flex-direction: column; }
    .jf-hero__overview { display: none; }
    /* .jf-detail__poster-col width intentionally not changed — fixed at 220px */
    .jf-movies-header { flex-direction: column; align-items: flex-start; }
    .jf-footer__inner { flex-direction: column; }
    .jf-footer__copy { text-align: left; }
    .jf-footer__widget-row { grid-template-columns: 1fr; gap: 28px; }
    .jf-cast-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
}
