/* JEENFLIX: Netflix-inspired layer (ข้อเสนอ ยังไม่ขึ้นเว็บจริง)
   โหลดต่อจาก cinema.css · เปลี่ยนแค่หน้าตา ไม่แตะ HTML/PHP
   แรงบันดาลใจ: ธีมมืด แถวโปสเตอร์ชิดกัน การ์ดขยายเมื่อชี้ ปุ่มหลักสีขาว
   ไม่ใช้โลโก้หรือไฟล์ใด ๆ ของ Netflix */

:root{--bg:#141414;--surface:#1f1f1f;--raised:#2a2a2a;--line:#2f2f2f;--muted:#a3a3a3;--accent:#e50914}
body{background:var(--bg)}

/* 1) Header: ติดบนตลอด พื้นมืดโปร่งนิด ๆ เมนูแบบ pill */
.header{position:sticky;top:0;z-index:60;background:rgba(20,20,20,.94);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.admin-bar .header{top:32px}
.header-inner{min-height:68px;padding:10px var(--page);gap:28px}
.brand{font-size:28px}
.header nav{font-size:14px;gap:4px}
.header nav a{display:inline-flex;align-items:center;min-height:38px;padding:0 14px;border-radius:999px;color:#e5e5e5;transition:background .2s,color .2s}
.header nav a:hover{color:#fff;background:rgba(255,255,255,.08)}
.header nav a[aria-current]{background:rgba(255,255,255,.16);color:#fff;font-weight:700}
.header-search summary svg{stroke:#fff}

/* 2) Hero: การ์ดขอบมน ข้อความใหญ่อ่านง่าย ปุ่มหลักขาว ปุ่มรองเทาโปร่ง */
.cinema-hero{margin:6px var(--page) 0;border-radius:16px;min-height:540px;background:#0c0c0c}
.cinema-art{width:60%;background:#0c0c0c}
.cinema-art img{object-position:center 22%}
.cinema-art:after{background:linear-gradient(90deg,#0c0c0c 0%,rgba(12,12,12,.9) 14%,rgba(12,12,12,.35) 42%,transparent 70%),linear-gradient(0deg,#0c0c0c 0%,rgba(12,12,12,.4) 22%,transparent 50%)}
.cinema-copy{min-height:540px;max-width:760px;padding:56px 56px 52px;display:flex;flex-direction:column;justify-content:flex-end}
.hero-eyebrow{margin-bottom:18px}
.cinema-copy h1,.cinema-copy .hero-title{font-size:clamp(40px,4.4vw,64px);line-height:1.15;letter-spacing:-1px;margin-bottom:16px}
.hero-meta{font-size:14px;color:#e5e5e5;gap:8px 10px}
.hero-meta span+span:before{content:"•";margin-right:10px;color:#a3a3a3}
.hero-description{font-size:15px;line-height:1.75;color:#f0f0f0;max-width:540px;margin-top:14px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hero-actions{margin-top:24px;gap:10px}
.hero-actions .button{min-height:46px;padding:10px 28px;border:0;border-radius:6px;font-size:16px;font-weight:700}
.hero-actions .button.primary{background:#fff;color:#000}
.hero-actions .button:not(.primary){background:rgba(109,109,110,.7);color:#fff}
.hero-actions .button:hover{filter:none;opacity:.85}
.hero-side-label{display:none}

/* 3) แถบหมวด: chip กลมแทนเส้นคั่น */
.discovery-nav{margin-top:22px;padding:0;gap:10px;border:0;font-size:14px;scrollbar-width:none}
.discovery-nav::-webkit-scrollbar{display:none}
.discovery-nav>span{display:none}
.discovery-nav a{min-height:36px;padding:0 16px;border:1px solid #4a4a4a;border-radius:999px;color:#e5e5e5;transition:border-color .2s,background .2s}
.discovery-nav a:hover{border-color:#fff;background:rgba(255,255,255,.06)}
.discovery-nav a:first-of-type{background:#fff;border-color:#fff;color:#000}

/* 4) แถวโปสเตอร์: ชิดกัน ไม่มีสกรอลบาร์ การ์ดขยายเมื่อชี้ */
.cinema-shelves{padding-top:30px}
.cinema-shelf{margin-bottom:34px}
.section-head{margin-bottom:6px}
.section-head h2{font-size:21px;font-weight:700;color:#e5e5e5;letter-spacing:0}
.source-note{font-size:12px;color:#808080;margin:0 0 4px}
.poster-rail{gap:8px;padding:16px 4px 20px;scrollbar-width:none}
.poster-rail::-webkit-scrollbar{display:none}
.poster-rail>.card,.poster-rail>.legacy-card{flex:0 0 calc((100% - 40px)/6)}
.card .poster{position:relative;border-radius:6px;overflow:hidden;transition:transform .28s ease,box-shadow .28s ease}
.card a:hover .poster,.card a:focus-visible .poster{transform:scale(1.07);box-shadow:0 14px 30px rgba(0,0,0,.75),0 0 0 2px rgba(255,255,255,.9);z-index:3}
.poster-rail>:first-child .poster{transform-origin:left center}
.card a:hover img{transform:none}
.card h3{font-size:13px;line-height:1.6;color:#b3b3b3;margin-top:9px}
.legacy-count{color:#7a7a7a}
.poster .badge{top:auto;right:auto;bottom:8px;left:8px;background:var(--accent);color:#fff;font-weight:700;font-size:10px;border-radius:3px;padding:2px 7px}
.rail-controls button{width:34px;height:34px;border-color:#555;background:rgba(20,20,20,.7);transition:background .2s,border-color .2s}
.rail-controls button:hover:not(:disabled){background:#fff;color:#000;border-color:#fff}

/* 5) Top 10 / ส่วนอื่น: ให้โทนเดียวกัน */
.period-tabs{border-radius:999px;border-color:#444}.period-tabs a{border-radius:999px}
.ranking-empty{border-radius:10px;border-left-width:1px}
.site-footer{border-color:var(--line);color:#808080}

/* 6) ฟอนต์: Kanit สำหรับหัวข้อ/ปุ่ม/เมนู · Noto Sans Thai สำหรับเนื้อหา (Google Fonts, โหลดใน functions.php) */
body,input,select,textarea{font-family:"Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif}
h1,h2,.watch-title,.section-head h2,.button,.header nav,.discovery-nav,.period-tabs,.top-thai,.rail-controls button,.episode-grid a,.up-next{font-family:"Kanit","Noto Sans Thai",sans-serif}
.cinema-copy h1,.cinema-copy .hero-title{font-weight:600;letter-spacing:0;line-height:1.12}
.section-head h2,.watch-title,.detail-copy h1{font-weight:500}
.header nav,.discovery-nav{font-weight:400}.header nav a[aria-current]{font-weight:500}
.button,.hero-actions .button{font-weight:500}
.card h3{font-weight:400}

/* 7) ปุ่ม Hero แบบไอคอน: ▶ เล่น / ⓘ ข้อมูลเพิ่มเติม */
.button .icon{width:22px;height:22px;flex-shrink:0;fill:currentColor}
.hero-actions .button{display:inline-flex;align-items:center;gap:10px}
.hero-actions .button.play{padding-left:22px;padding-right:30px;font-size:18px}
.hero-actions .button.play .icon{width:26px;height:26px}

/* 8) เล่นตอนถัดไปอัตโนมัติ */
.player{position:relative}.player.has-frame{background:#000}.player iframe{color-scheme:light}
.up-next{position:absolute;right:20px;bottom:64px;z-index:5;max-width:min(340px,calc(100% - 40px));padding:16px 18px;border-radius:10px;background:rgba(20,20,20,.94);box-shadow:0 12px 30px rgba(0,0,0,.6);color:#fff}
.up-next p{margin:0 0 12px;font-size:15px}.up-next b{color:#fff;font-size:18px}
.up-next div{display:flex;gap:8px;flex-wrap:wrap}
.up-next .button{min-height:40px;padding:8px 16px;font-size:14px;border-radius:6px}
.up-next .button.primary{background:#fff;color:#000;border:0}
.up-next .button:not(.primary){background:rgba(109,109,110,.7);color:#fff;border:0}
.up-next-bar{height:3px;margin:0 0 12px;background:#444;border-radius:3px;overflow:hidden}
.up-next-bar i{display:block;height:100%;background:var(--accent);animation:jx-upnext 5s linear forwards}
@keyframes jx-upnext{from{width:0}to{width:100%}}
.unmute-hint{position:absolute;left:16px;top:16px;z-index:6;min-height:44px;padding:10px 18px;border:0;border-radius:999px;background:#fff;color:#000;font:500 15px "Kanit","Noto Sans Thai",sans-serif;box-shadow:0 8px 24px rgba(0,0,0,.5);cursor:pointer}
.auto-next{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#ccc;cursor:pointer;min-height:44px}
.auto-next input{width:18px;height:18px;accent-color:var(--accent)}

.period-caption{display:none}
/* 9) Top 10: เลขใหญ่ขอบโปร่งข้างโปสเตอร์ */
.rank-rail{gap:14px}
.rank-rail>.legacy-card.ranked{flex:0 0 calc((100% - 56px)/5);position:relative;min-width:0;container-type:inline-size}
/* โปสเตอร์กว้าง 66% ของการ์ด สูง 88% (3:4) → วางเลขให้ฐานตรงกับขอบล่างโปสเตอร์ */
.rank-number{position:absolute;left:-2cqw;top:22cqw;font:900 80cqw/.8 Arial,sans-serif;letter-spacing:-7cqw;color:#141414;-webkit-text-stroke:max(2px,1cqw) #5c5c5c;user-select:none;z-index:0;pointer-events:none}
.ranked-body{position:relative;z-index:1;min-width:0}
.legacy-card.ranked .ranked-body{margin-left:34cqw}
.poster-rail .rank-badge{display:none}
.ranked-body .card{margin:0}
.legacy-card.ranked:hover .rank-number{-webkit-text-stroke-color:#bbb}

@media(max-width:1100px){.rank-rail>.legacy-card.ranked{flex-basis:calc((100% - 28px)/3)}}
@media(max-width:700px){.rank-rail{gap:8px}.rank-rail>.legacy-card.ranked{flex-basis:56%}}
@media(max-width:1100px){.poster-rail>.card,.poster-rail>.legacy-card{flex-basis:calc((100% - 24px)/4)}}
@media(max-width:782px){.admin-bar .header{top:46px}}
@media(max-width:700px){
  .header-inner{min-height:0;padding:12px var(--page) 10px}
  .header nav{gap:2px;font-size:13px}.header nav a{min-height:34px;padding:0 11px}
  .cinema-hero{margin:4px 12px 0;border-radius:14px;min-height:0}
  .cinema-art{width:100%;height:430px}
  .cinema-art:after{background:linear-gradient(0deg,#0c0c0c 0%,rgba(12,12,12,.75) 25%,transparent 60%)}
  .cinema-copy{min-height:0;padding:250px 20px 26px;display:block}
  .cinema-copy h1,.cinema-copy .hero-title{font-size:38px;line-height:1.2;max-width:none}
  .hero-description{font-size:13px;-webkit-line-clamp:3}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr}
  .hero-actions .button{font-size:14px;padding:10px 12px;justify-content:center}
  .discovery-nav{margin-top:18px;gap:8px;font-size:13px}.discovery-nav a{min-height:34px;padding:0 14px}
  .section-head h2{font-size:18px}
  .poster-rail{gap:6px;padding:10px 3px 14px}
  .poster-rail>.card,.poster-rail>.legacy-card{flex-basis:calc((100% - 12px)/2.6)}
  .card h3{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.card .poster{transition:none}.card a:hover .poster{transform:none}}
