:root{color-scheme:dark;--bg:#07070b;--panel:#111117;--panel2:#17171f;--line:#292932;--text:#f6f6f8;--muted:#9b9ba6;--pink:#ff315f;--pink2:#ff5d7f}*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding-bottom:76px}a{color:inherit;text-decoration:none}img{display:block;max-width:100%}.topbar{height:68px;position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:24px;padding:0 max(18px,calc((100vw - 1240px)/2));background:rgba(7,7,11,.94);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}.brand{font-weight:900;font-size:24px;letter-spacing:-1px;white-space:nowrap}.brand-x{color:var(--pink)}.desktop-nav{display:flex;gap:22px;font-size:14px;color:#d5d5dc}.desktop-nav a:hover{color:#fff}.top-actions{margin-left:auto;display:flex;gap:9px;align-items:center}.top-actions select,.icon-btn,.btn{height:40px;border:1px solid var(--line);background:var(--panel2);color:#fff;border-radius:12px;padding:0 12px}.icon-btn{width:42px;display:grid;place-items:center;font-size:22px}.btn{display:flex;align-items:center}.avatar-mini{width:38px;height:38px;border-radius:50%;background:#25252e;display:grid;place-items:center}main{max-width:1240px;margin:auto}.hero{margin:20px 16px 8px;min-height:330px;border-radius:26px;overflow:hidden;position:relative;background:radial-gradient(circle at 82% 20%,rgba(255,49,95,.28),transparent 35%),linear-gradient(135deg,#1a1118,#0b0b11 58%,#16101a);border:1px solid #25252d}.hero:after{content:"";position:absolute;inset:auto -80px -160px auto;width:420px;height:420px;border-radius:50%;background:rgba(255,49,95,.08);filter:blur(10px)}.hero-content{position:relative;z-index:2;padding:54px;max-width:720px}.eyebrow{font-size:13px;font-weight:900;letter-spacing:2px;color:var(--pink2);margin-bottom:12px}.hero h1{font-size:clamp(38px,5vw,66px);line-height:.98;letter-spacing:-2.5px;margin:0 0 18px}.hero p{font-size:18px;line-height:1.55;color:#c9c9d0;max-width:650px}.search-panel form{display:grid;grid-template-columns:1fr 160px 100px;gap:8px;margin-top:26px}.search-panel input,.search-panel select,.search-panel button{height:48px;border-radius:13px;border:1px solid #34343e;padding:0 14px;font:inherit}.search-panel input,.search-panel select{background:#0b0b10;color:#fff}.search-panel button{background:var(--pink);border-color:var(--pink);font-weight:800;color:#fff}.provider-strip{display:flex;gap:9px;overflow-x:auto;padding:12px 16px 4px;scrollbar-width:none}.provider-strip::-webkit-scrollbar{display:none}.provider-strip a{flex:0 0 auto;padding:9px 14px;border:1px solid var(--line);background:var(--panel);border-radius:999px;font-size:13px;font-weight:700}.provider-strip a:first-child{border-color:#6d2638}.content-section{padding:26px 16px 4px}.section-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:14px}.section-head h2{font-size:27px;margin:0;letter-spacing:-.8px}.section-head a{font-size:14px;color:var(--muted)}.poster-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}.poster-card{min-width:0}.poster-img{position:relative;aspect-ratio:2/3;border-radius:15px;overflow:hidden;background:linear-gradient(145deg,#1f1f28,#111116);border:1px solid #25252e}.poster-img img{width:100%;height:100%;object-fit:cover}.poster-placeholder{height:100%;display:grid;place-items:center;font-size:46px;font-weight:900;color:#ff315f}.poster-episodes{position:absolute;right:7px;bottom:7px;background:rgba(0,0,0,.78);padding:5px 8px;border-radius:8px;font-size:11px;font-weight:800}.poster-title{font-weight:750;font-size:14px;line-height:1.25;margin-top:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.poster-meta{display:flex;gap:7px;color:var(--muted);font-size:11px;margin-top:5px;white-space:nowrap;overflow:hidden}.empty{border:1px dashed #30303a;background:#0e0e14;color:var(--muted);border-radius:16px;padding:24px;text-align:center}.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:60;height:70px;background:rgba(12,12,17,.97);border-top:1px solid var(--line);display:none;align-items:center;justify-content:space-around;padding-bottom:env(safe-area-inset-bottom)}
@media(max-width:850px){body{padding-bottom:78px}.topbar{height:62px;padding:0 15px;gap:8px}.brand{font-size:22px}.desktop-nav{display:none}.top-actions{gap:7px}.top-actions select{max-width:128px}.top-actions .ghost{display:none}main{width:100%}.hero{min-height:0;margin:12px 12px 6px;border-radius:20px}.hero-content{padding:28px 20px 24px}.eyebrow{font-size:11px;margin-bottom:9px}.hero h1{font-size:36px;line-height:1.03;letter-spacing:-1.5px;margin-bottom:12px}.hero p{font-size:15px;line-height:1.45;margin:0}.search-panel form{grid-template-columns:1fr 48px;margin-top:19px}.search-panel select{display:none}.search-panel button{font-size:0;width:48px;padding:0}.search-panel button:after{content:"⌕";font-size:22px}.provider-strip{padding:11px 12px 2px}.content-section{padding:24px 12px 0}.section-head{margin-bottom:11px}.section-head h2{font-size:22px}.poster-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 9px}.poster-img{border-radius:11px}.poster-title{font-size:12px;margin-top:7px}.poster-meta{font-size:10px}.poster-meta span:nth-child(2){display:none}.bottom-nav{display:flex}}
@media(max-width:390px){.poster-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero h1{font-size:33px}}

/* XDramaFlix v6 mobile/performance overrides */
.poster-img img{width:100%;height:100%;object-fit:cover;object-position:center}.poster-card{content-visibility:auto;contain-intrinsic-size:160px 280px}
@media(max-width:850px){.poster-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}.poster-title{font-size:13px}.hero-content{padding:24px 18px 20px}.hero h1{font-size:32px}.hero p{font-size:14px}.detail-poster{width:118px!important;max-width:34vw}.detail-cover{max-height:270px}}
@media(min-width:851px){.poster-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
html[dir=rtl] .topbar,html[dir=rtl] .section-head,html[dir=rtl] .footer{direction:rtl}html[dir=rtl] .top-actions{margin-left:0;margin-right:auto}
/* v7 mobile layout fixes */
.xdf-feed-head{align-items:center}.xdf-feed-switch{position:relative}.xdf-feed-switch summary{list-style:none;cursor:pointer;width:42px;height:38px;border:1px solid var(--line);border-radius:12px;background:var(--panel2);display:grid;place-items:center;font-size:20px}.xdf-feed-switch summary::-webkit-details-marker{display:none}.xdf-feed-menu{position:absolute;right:0;top:44px;z-index:30;width:190px;padding:7px;background:#15151d;border:1px solid #30303a;border-radius:13px;box-shadow:0 18px 45px #0008}.xdf-feed-menu a{display:block;padding:10px;border-radius:9px;font-size:13px}.xdf-feed-menu a.active,.xdf-feed-menu a:hover{background:#252532;color:#fff}.footer{padding-bottom:96px}.xdh-footer-copy{font-size:12px!important;line-height:1.55!important;max-width:720px;color:#888!important}.mobile-nav{display:none}
@media(max-width:850px){.poster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 10px!important}.poster-title{font-size:13px!important}.mobile-nav{display:grid!important;grid-template-columns:repeat(4,1fr)!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;height:calc(68px + env(safe-area-inset-bottom))!important;padding-bottom:env(safe-area-inset-bottom)!important;background:rgba(13,13,18,.98)!important;border-top:1px solid #292932!important;z-index:9999!important}.mobile-nav a{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;font-size:22px!important;line-height:1!important}.mobile-nav span{font-size:10px!important;color:#b9b9c1!important}.footer{font-size:12px!important;padding:20px 14px calc(88px + env(safe-area-inset-bottom))!important;margin-top:22px!important}.footer .brand{font-size:17px!important}.xdh-footer-copy{font-size:11px!important;margin:9px 0 0!important}.detail-cover{height:180px!important;background-position:center 25%!important;filter:brightness(.42) saturate(.85)!important}.detail-wrap{margin:-54px 14px 0!important;display:grid!important;grid-template-columns:82px 1fr!important;gap:12px!important;align-items:end!important;padding-bottom:12px!important}.detail-poster{width:82px!important;border-radius:10px!important}.detail-info h1{font-size:clamp(24px,7.4vw,31px)!important;line-height:1.04!important;margin:0 0 7px!important}.xdh-meta{margin:6px 0!important;gap:5px!important}.xdh-meta span{font-size:11px!important;padding:5px 8px!important}.detail-info #watchNow{grid-column:1/-1!important;width:100%!important;margin-top:7px!important}.xdh-about-card{margin:8px 12px 14px!important;padding:14px!important}.xdh-about-card h2{font-size:22px!important}.xdh-about-card p{font-size:13px!important;line-height:1.55!important}.xdf-single-feed{padding-bottom:4px!important}}

/* XDramaFlix v8 final mobile/index controls */
#watchNow{min-height:48px!important;padding:0 22px!important;border:0!important;border-radius:14px!important;background:linear-gradient(135deg,#ff315f,#ff4d82)!important;color:#fff!important;font-weight:900!important;font-size:15px!important;letter-spacing:.1px!important;box-shadow:0 10px 28px rgba(255,49,95,.24)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;cursor:pointer!important}
#watchNow:hover{transform:translateY(-1px);filter:brightness(1.06)}
.mobile-nav{box-sizing:border-box}
@media(max-width:850px){body{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}.mobile-nav{display:grid!important;visibility:visible!important;opacity:1!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;position:fixed!important;inset:auto 0 0 0!important;min-height:68px!important;height:auto!important;padding:5px 4px calc(5px + env(safe-area-inset-bottom))!important;background:#0d0d12!important;border-top:1px solid #30303a!important;z-index:2147483000!important;box-shadow:0 -10px 30px rgba(0,0,0,.38)!important}.mobile-nav a{min-width:0!important;min-height:58px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;font-size:21px!important;color:#f7f7fa!important}.mobile-nav span{display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:10px!important;color:#c4c4cc!important}.poster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.xdf-latest-feed{padding-top:28px!important}.detail-info #watchNow{min-height:50px!important;border-radius:14px!important;font-size:15px!important}.footer{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}}

/* v9 mobile visual polish: larger footer + clean drama hero */
@media(max-width:850px){
  .footer{padding:30px 22px calc(92px + env(safe-area-inset-bottom))!important;margin-top:34px!important;min-height:0!important;gap:14px!important}
  .footer .brand{font-size:25px!important;line-height:1.1!important}
  .xdh-footer-copy{font-size:15px!important;line-height:1.62!important;max-width:none!important;margin:16px 0 0!important;color:#aaaab2!important}
  .xdh-footer-right{font-size:15px!important;margin-top:18px!important}
  .detail-hero{padding-bottom:4px!important;overflow:hidden!important}
  .detail-cover{height:150px!important;max-height:150px!important;background-position:center 28%!important;filter:brightness(.32) saturate(.82)!important;position:relative!important}
  .detail-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(7,7,11,.05) 0%,rgba(7,7,11,.45) 62%,#08080d 100%)}
  .detail-wrap{margin:-18px 14px 0!important;position:relative!important;z-index:2!important;display:grid!important;grid-template-columns:96px minmax(0,1fr)!important;gap:13px!important;align-items:start!important;padding-bottom:14px!important}
  .detail-poster{width:96px!important;max-width:none!important;border-radius:11px!important;overflow:hidden!important;box-shadow:0 12px 28px rgba(0,0,0,.5)!important}
  .detail-info{min-width:0!important;padding-top:5px!important}
  .detail-info h1{font-size:clamp(21px,6.4vw,28px)!important;line-height:1.08!important;margin:0 0 8px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;text-shadow:none!important}
  .xdh-meta{margin:5px 0 7px!important;gap:5px!important;display:flex!important;flex-wrap:wrap!important}
  .xdh-meta span,.xdh-meta button{font-size:10px!important;padding:5px 7px!important}
  .detail-info #watchNow{grid-column:1/-1!important;min-height:52px!important;margin-top:9px!important;font-size:16px!important;border-radius:14px!important}
}
