/* Netflix-style theme for personal.html category pages -- active only while
   body.theme-netflix is set by assets/personal-netflix.js.
   v2 (2026-09-29): modelled on Audi's Netflix screenshots. */

body.theme-netflix { background: #141414; --nf-red: #e50914; --nf-text: #e5e5e5; --nf-sub: #a3a3a3; }
/* Edge-to-edge like Netflix: no centred 1000px column, 4% side gutters. */
body.theme-netflix .gallery-wrap { max-width: none; padding: 0 4% 5rem; }
body.theme-netflix .back-bar,
body.theme-netflix .hero-title,
body.theme-netflix .hero-sub,
body.theme-netflix .category-view-header,
body.theme-netflix .pcms-admin-only[onclick="openDraftModal()"],
body.theme-netflix[data-nf-cat="movie"] .gallery-section[data-category="movie"] { display: none !important; }

#netflixView { display: none; font-family: 'Outfit', 'Mitr', var(--font-body, 'Plus Jakarta Sans', 'Sarabun'), sans-serif; color: var(--nf-text); }
body.theme-netflix #netflixView { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- top bar ---------- */
.nf-bar {
    position: sticky; top: 64px; z-index: 40; display: flex; align-items: center; gap: 22px;
    margin: 0 -4.2%; padding: 14px 4.2%; background: #141414;
    box-shadow: 0 10px 20px -12px rgba(0,0,0,0.8);
}
.nf-logo { font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-size: 2.1rem; line-height: 1; color: var(--nf-red); letter-spacing: .02em; flex: 0 0 auto; }
.nf-pills { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nf-pills::-webkit-scrollbar { display: none; }
.nf-pill {
    flex: 0 0 auto; background: none; border: 0; color: #e5e5e5; font: inherit; font-size: .95rem; font-weight: 500;
    padding: 8px 16px; border-radius: 500px; cursor: pointer; white-space: nowrap; transition: color .15s ease, background .15s ease;
}
.nf-pill:hover { color: #b3b3b3; }
.nf-pill.is-on { background: rgba(109,109,110,0.55); color: #fff; font-weight: 700; }
.nf-pill span { font-size: .72rem; color: #b3b3b3; margin-left: 2px; }
.nf-pill.is-on span { color: #ddd; }
.nf-bar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.nf-icon { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; display: inline-flex; }
.nf-search { display: flex; align-items: center; gap: 4px; border: 1px solid transparent; padding: 2px 4px; transition: border-color .2s ease, background .2s ease; }
.nf-search input { width: 0; opacity: 0; padding: 4px 0; border: 0; background: none; color: #fff; font: inherit; font-size: .9rem; outline: none; transition: width .25s ease, opacity .2s ease; }
.nf-search.is-open { border-color: #fff; background: rgba(0,0,0,0.75); }
.nf-search.is-open input { width: 180px; opacity: 1; padding: 4px 6px; }
.nf-bar-btn { background: var(--nf-red); color: #fff; border: 0; border-radius: 4px; padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.nf-bar-btn.is-ghost { background: none; color: #e5e5e5; border: 1px solid rgba(255,255,255,0.3); }
.nf-bar-btn:hover { filter: brightness(1.12); }
.nf-pill:focus-visible, .nf-icon:focus-visible, .nf-bar-btn:focus-visible, .nf-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- billboard ---------- */
.nf-hero {
    position: relative; margin: 10px 0 0; border-radius: 14px; overflow: hidden; background: #000;
    height: min(76vh, 760px); min-height: 380px;
}
.nf-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nf-hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(77deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 38%, rgba(0,0,0,0) 62%),
                linear-gradient(0deg, rgba(20,20,20,0.55) 0%, rgba(20,20,20,0) 30%);
}
.nf-hero-logo { position: absolute; top: 26px; left: 38px; font-family: 'Bebas Neue', sans-serif; font-size: 3rem; line-height: 1; color: var(--nf-red); text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.nf-hero-body { position: absolute; left: 38px; bottom: 44px; max-width: min(620px, 70%); }
.nf-hero-title {
    font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-weight: 400; color: #fff; margin: 0 0 14px;
    font-size: clamp(3.2rem, 8vw, 7.2rem); line-height: .9; letter-spacing: .06em; text-shadow: 0 3px 20px rgba(0,0,0,0.5);
}
.nf-hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
.nf-dot { color: #bbb; font-weight: 400; }
.nf-hero-blurb { margin: 0 0 18px; color: #fff; font-size: 1.15rem; line-height: 1.45; text-shadow: 0 1px 8px rgba(0,0,0,0.7); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nf-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.nf-btn {
    display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 500px; padding: 12px 26px;
    font: inherit; font-size: 1.15rem; font-weight: 700; cursor: pointer; transition: background .15s ease;
}
.nf-btn-play { background: #fff; color: #000; }
.nf-btn-play:hover { background: rgba(255,255,255,0.78); }
.nf-btn-more { background: rgba(109,109,110,0.7); color: #fff; }
.nf-btn-more:hover { background: rgba(109,109,110,0.45); }
.nf-hero-badges { position: absolute; right: 38px; bottom: 44px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 45%; }
.nf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 6px; background: rgba(20,20,20,0.72); backdrop-filter: blur(6px); color: #fff; font-size: .85rem; font-weight: 700; }
.nf-chip-ico { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 3px; background: var(--nf-red); font-size: .72rem; font-weight: 800; }
.nf-chip-ico.is-gold { background: #f5c542; color: #1a1300; }

/* ---------- rows ---------- */
.nf-row { margin: 34px 0 0; }
.nf-row-title { font-size: 1.55rem; font-weight: 700; color: #e5e5e5; margin: 0 0 12px; }
.nf-row-title span { font-size: .9rem; font-weight: 400; color: var(--nf-sub); margin-left: 8px; }
.nf-row-wrap { position: relative; margin: 0 -4.2%; }
.nf-track {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 8.4% - 6 * 8px) / 6.6); gap: 8px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 4.2%;
    padding: 14px 4.2% 16px; margin: -14px 0 -16px; scrollbar-width: none;
}
.nf-track::-webkit-scrollbar { display: none; }
.nf-arrow {
    position: absolute; top: 0; bottom: 0; width: 4%; min-width: 34px; z-index: 5; border: 0; cursor: pointer;
    background: rgba(20,20,20,0.5); color: #fff; font-size: 3rem; line-height: 1; opacity: 0; transition: opacity .2s ease, background .2s ease;
    display: none;
}
.nf-left { left: 0; }
.nf-right { right: 0; }
.nf-row-wrap.has-overflow .nf-arrow { display: block; }
.nf-row-wrap.at-start .nf-left, .nf-row-wrap.at-end .nf-right { display: none; }
.nf-row-wrap:hover .nf-arrow { opacity: 1; }
.nf-arrow:hover { background: rgba(20,20,20,0.8); }

/* ---------- tiles ---------- */
.nf-tile { display: block; padding: 0; border: 0; background: none; cursor: pointer; scroll-snap-align: start; color: inherit; font: inherit; text-align: left; }
.nf-art {
    position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #2f2f2f;
    transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.nf-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-noart { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 2.4rem; }
.nf-rank {
    position: absolute; top: 0; left: 8px; background: var(--nf-red); color: #fff; width: 26px; padding: 3px 0 4px;
    display: flex; flex-direction: column; align-items: center; line-height: 1; border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.nf-rank b { font-size: .95rem; font-weight: 800; }
.nf-rank small { font-size: .55rem; margin-top: 1px; }
.nf-label {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: 3px 3px 0 0;
    background: var(--nf-red); color: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.nf-label.is-gold { background: #f5c542; color: #1a1300; }
.nf-hover {
    position: absolute; inset: auto 0 0 0; padding: 30px 10px 8px; display: flex; flex-direction: column; gap: 2px;
    background: linear-gradient(0deg, rgba(0,0,0,0.92), rgba(0,0,0,0)); opacity: 0; transition: opacity .2s ease;
}
.nf-hover-title { color: #fff; font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-hover-meta { color: #ccc; font-size: .75rem; }
.nf-stars i { font-style: normal; color: rgba(255,255,255,0.25); }
.nf-stars i.on { color: #f5c542; }
.nf-tile:hover .nf-art, .nf-tile:focus-visible .nf-art { transform: scale(1.12); box-shadow: 0 14px 30px rgba(0,0,0,0.75); z-index: 3; }
.nf-tile:hover .nf-hover, .nf-tile:focus-visible .nf-hover { opacity: 1; }
.nf-tile:hover .nf-label, .nf-tile:focus-visible .nf-label { opacity: 0; }
.nf-tile:focus-visible { outline: none; }
.nf-tile:focus-visible .nf-art { outline: 2px solid #fff; outline-offset: 2px; }
.nf-track .nf-tile:first-child:hover .nf-art { transform-origin: left center; }
.nf-track .nf-tile:last-child:hover .nf-art { transform-origin: right center; }

.nf-grid-sec { margin: 26px 0; }
.nf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 8px; }
.nf-empty { color: var(--nf-sub); }

/* The review modal follows the theme while it's open over a Netflix page. */
body.theme-netflix .modal-content { background: #181818; border-color: #2a2a2a; }
body.theme-netflix .modal-tag { color: #fff; background: var(--nf-red); }

@media (prefers-reduced-motion: reduce) {
    .nf-art, .nf-hover, .nf-search input { transition: none; }
}
@media (max-width: 900px) {
    .nf-bar { flex-wrap: wrap; gap: 10px 14px; }
    .nf-pills { order: 3; width: 100%; }
    .nf-track { grid-auto-columns: calc((100% - 8.4% - 2 * 8px) / 2.4); }
}
@media (max-width: 720px) {
    .nf-logo { font-size: 1.7rem; }
    .nf-search.is-open input { width: 120px; }
    .nf-bar-btn.is-ghost { padding: 6px 10px; }
    .nf-hero { height: 70vh; border-radius: 10px; }
    .nf-hero-logo { top: 16px; left: 18px; font-size: 2.3rem; }
    .nf-hero-body { left: 18px; right: 18px; bottom: 26px; max-width: none; }
    .nf-hero-badges { display: none; }
    .nf-btn { padding: 10px 20px; font-size: 1rem; }
    .nf-track { grid-auto-columns: calc((100% - 8.4% - 8px) / 1.6); }
    .nf-hover { opacity: 1; }
    .nf-label { display: none; } /* the always-on info strip already says MASTERPIECE (2026-10-17) */
    .nf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 8px; }
}

/* ---------- v3: rotating MASTERPIECE billboard ---------- */
.nf-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; z-index: 0; }
.nf-slide.is-on { opacity: 1; z-index: 1; }
.nf-slide.is-on .nf-hero-img { animation: nf-kenburns 9s ease-out both; }
@keyframes nf-kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.nf-hero-logo { z-index: 2; }
.nf-hero-ctrl { position: absolute; top: 24px; right: 30px; z-index: 2; display: flex; align-items: center; gap: 12px; }
.nf-bars { display: flex; gap: 4px; }
.nf-bars i { display: block; width: 14px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.35); transition: background .3s ease, width .3s ease; }
.nf-bars i.is-on { background: #fff; width: 24px; }
.nf-pause {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.7); background: rgba(20,20,20,0.35);
    color: #fff; font-size: .8rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.nf-pause:hover { background: rgba(255,255,255,0.15); }
.nf-pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .nf-slide { transition: none; }
    .nf-slide.is-on .nf-hero-img { animation: none; }
}
@media (max-width: 720px) {
    .nf-hero-ctrl { top: 14px; right: 14px; gap: 8px; }
    .nf-bars i { width: 8px; }
    .nf-bars i.is-on { width: 16px; }
    .nf-pause { width: 32px; height: 32px; }
}
