/* 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. */

html[data-ak-sky] body.theme-netflix,
body.theme-netflix { background: #141414 !important; --nf-red: #e50914; --nf-text: #e5e5e5; --nf-sub: #a3a3a3; }
body.theme-netflix .ak-sky { display: none !important; }
/* 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: 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', 'Sarabun', 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: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px 0; }
.nf-pills::-webkit-scrollbar { display: none; }
.nf-pill {
    flex: 0 0 auto; background: linear-gradient(135deg, #27272d 0%, #19191e 100%); border: 1.5px solid rgba(255,255,255,0.26); color: #f8fafc; font: inherit; font-size: .92rem; font-weight: 700;
    padding: 7px 16px; border-radius: 500px; cursor: pointer; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12); transition: color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .15s ease;
}
.nf-pill:hover { background: linear-gradient(135deg, #35353f 0%, #23232a 100%); color: #ffffff; border-color: rgba(255,255,255,0.62); transform: translateY(-1px); }
.nf-pill.is-on { background: linear-gradient(135deg, #4b1519 0%, #2a0b0e 100%); color: #ffffff; border-color: #ff6b72; font-weight: 700; box-shadow: 0 6px 16px rgba(229,9,20,0.38), inset 0 1px 0 rgba(255,255,255,0.22); }
.nf-pill span { font-size: .74rem; color: #cbd5e1; font-weight: 700; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,0.1); }
.nf-pill.is-on span { color: #ffffff; background: rgba(255,255,255,0.18); }

/* Semantic Rating Tier Colors for .nf-pill */
.nf-pill[data-tab="r5"] { background: linear-gradient(135deg, #4f3812 0%, #2d1f09 100%); border-color: rgba(245, 158, 11, 0.72); color: #fef3c7; }
.nf-pill[data-tab="r5"] span { color: #fde68a; background: rgba(245, 158, 11, 0.22); }
.nf-pill[data-tab="r5"]:hover, .nf-pill[data-tab="r5"].is-on { background: linear-gradient(135deg, #684812 0%, #3b2708 100%); border-color: #fde68a; color: #ffffff; box-shadow: 0 6px 18px rgba(245, 158, 11, 0.42), inset 0 1px 0 rgba(255,255,255,0.25); }
.nf-pill[data-tab="r4"] { background: linear-gradient(135deg, #4c2263 0%, #2d123b 100%); border-color: rgba(168, 85, 247, 0.72); color: #f3e8ff; }
.nf-pill[data-tab="r4"] span { color: #e9d5ff; background: rgba(168, 85, 247, 0.22); }
.nf-pill[data-tab="r4"]:hover, .nf-pill[data-tab="r4"].is-on { background: linear-gradient(135deg, #682e87 0%, #3e1952 100%); border-color: #e9d5ff; color: #ffffff; box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255,255,255,0.25); }
.nf-pill[data-tab="r3"] { background: linear-gradient(135deg, #164e3e 0%, #0d3126 100%); border-color: rgba(16, 185, 129, 0.72); color: #ecfdf5; }
.nf-pill[data-tab="r3"] span { color: #a7f3d0; background: rgba(16, 185, 129, 0.22); }
.nf-pill[data-tab="r3"]:hover, .nf-pill[data-tab="r3"].is-on { background: linear-gradient(135deg, #17594c 0%, #0d352d 100%); border-color: #a7f3d0; color: #ffffff; box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38), inset 0 1px 0 rgba(255,255,255,0.25); }
.nf-pill[data-tab="r2"] { background: linear-gradient(135deg, #3f2813 0%, #24160a 100%); border-color: rgba(249, 115, 22, 0.7); color: #ffedd5; }
.nf-pill[data-tab="r2"] span { color: #fed7aa; background: rgba(249, 115, 22, 0.22); }
.nf-pill[data-tab="r2"]:hover, .nf-pill[data-tab="r2"].is-on { background: linear-gradient(135deg, #5c3a1b 0%, #36210e 100%); border-color: #fed7aa; color: #ffffff; box-shadow: 0 6px 18px rgba(249, 115, 22, 0.38), inset 0 1px 0 rgba(255,255,255,0.25); }
.nf-pill[data-tab="r1"] { background: linear-gradient(135deg, #3b352e 0%, #24201c 100%); border-color: rgba(148, 163, 184, 0.62); color: #e2e8f0; }
.nf-pill[data-tab="r1"] span { color: #cbd5e1; background: rgba(148, 163, 184, 0.22); }
.nf-pill[data-tab="r1"]:hover, .nf-pill[data-tab="r1"].is-on { background: linear-gradient(135deg, #52493f 0%, #332d27 100%); border-color: #e2e8f0; color: #ffffff; box-shadow: 0 6px 16px rgba(148, 163, 184, 0.32), inset 0 1px 0 rgba(255,255,255,0.22); }
.nf-pill[data-tab="r0"] { background: linear-gradient(135deg, #541c29 0%, #310f17 100%); border-color: rgba(244, 63, 94, 0.72); color: #ffe4e6; }
.nf-pill[data-tab="r0"] span { color: #fecdd3; background: rgba(244, 63, 94, 0.22); }
.nf-pill[data-tab="r0"]:hover, .nf-pill[data-tab="r0"].is-on { background: linear-gradient(135deg, #682132 0%, #3d121d 100%); border-color: #fecdd3; color: #ffffff; box-shadow: 0 6px 18px rgba(244, 63, 94, 0.4), inset 0 1px 0 rgba(255,255,255,0.25); }
.nf-pill[data-tab="watchlist"] { background: linear-gradient(135deg, #542912 0%, #301608 100%); border-color: rgba(249, 115, 22, 0.76); color: #ffedd5; }
.nf-pill[data-tab="watchlist"] span { color: #bae6fd; background: rgba(56, 189, 248, 0.22); }
.nf-pill[data-tab="watchlist"]:hover, .nf-pill[data-tab="watchlist"].is-on { background: linear-gradient(135deg, #753918 0%, #45200b 100%); border-color: #fdba74; color: #ffffff; box-shadow: 0 6px 18px rgba(249, 115, 22, 0.42), inset 0 1px 0 rgba(255,255,255,0.25); }
.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: 8px; padding: 8px 15px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.nf-bar-btn.is-ghost { background: linear-gradient(135deg, #27272d 0%, #19191e 100%); color: #f8fafc; border: 1.5px solid rgba(255,255,255,0.32); box-shadow: 0 4px 12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12); }
.nf-bar-btn.is-ghost:hover { background: linear-gradient(135deg, #363640 0%, #24242c 100%); color: #ffffff; border-color: #ff6b72; }
.nf-bar-btn:hover { filter: brightness(1.06); }
.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', 'Sarabun', 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: #e2e8f0; padding: 24px 20px; text-align: center; font-weight: 600;
    background: linear-gradient(135deg, #24242b 0%, #17171c 100%);
    border: 1.5px solid rgba(255,255,255,0.22); border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* 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; }
}
