/* ============================================================
   Kagura — design system
   Dark streaming-aggregator layout language:
   pure black, azure accent, light geometric headings.
   ============================================================ */

@keyframes kg-glow {
  0%, 100% { text-shadow: 0 0 12px rgba(255,255,255,0.25), 0 0 28px rgba(255,255,255,0.12); }
  50% { text-shadow: 0 0 20px rgba(255,255,255,0.45), 0 0 44px rgba(255,255,255,0.2); }
}
@keyframes kg-streak {
  0% { transform: translateY(100%); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateY(-130%); opacity: 0; }
}
#site-loader {
  position: fixed; inset: 0; background: #050506; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.65s cubic-bezier(0.62,0,0.35,1);
  will-change: transform;
}
#site-loader.exiting {
  transform: translateY(-100%);
}
#site-loader-text {
  font-weight: 800; font-size: clamp(30px, 4.2vw, 58px);
  letter-spacing: 0.03em; color: #f5f5f5;
  animation: kg-glow 2.4s ease-in-out infinite; user-select: none;
}
#site-loader-streak {
  position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: linear-gradient(to top, rgba(229,9,20,0.9), rgba(229,9,20,0));
  z-index: 2; pointer-events: none; opacity: 0;
}
#site-loader.exiting #site-loader-streak {
  animation: kg-streak 0.6s cubic-bezier(0.4,0,0.2,1) forwards;
}

:root{
  --bg:            #000000;
  --surface:       #08080a;
  --surface-2:     #0f0f13;
  --surface-3:     #16161b;
  --line:          #1c1c22;
  --line-soft:     #141419;

  --text:          #ffffff;
  --dim:           #9c9ca8;
  --faint:         #63636f;

  --accent:        #e50914;
  --accent-hi:     #ff303b;
  --accent-deep:   #b20710;
  --accent-glow:   rgba(229, 9, 20, 0.4);

  --green:         #3ddc84;
  --green-bg:      rgba(61,220,132,.16);
  --gold:          #f5a623;
  --gold-bg:       rgba(245,166,35,.16);

  --font:          Poppins,system-ui,sans-serif;
  --font-display:  Poppins,system-ui,sans-serif;

  --r-sm:  8px;
  --r:     12px;
  --r-lg:  18px;
  --r-pill: 999px;

  --nav-h: 68px;
  --maxw:  1920px;
  --gutter: clamp(16px, 1.6vw, 26px);

  --ease:  cubic-bezier(.22,.61,.36,1);
  --ease-o: cubic-bezier(.16,1,.3,1);
}

*,*::before,*::after{ box-sizing:border-box; }

html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  font-size:14px;
  font-weight:400;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
button{ font:inherit; color:inherit; }
::selection{ background:var(--accent); color:#fff; }

/* keyboard focus — a single visible ring for tab users; pointer clicks stay clean */
:focus{ outline:none; }
:focus-visible{
  outline:2px solid var(--accent-hi);
  outline-offset:3px;
  border-radius:var(--r-sm);
}
.card a:focus-visible{ outline:none; }
.card a:focus-visible .card-poster{
  outline:2px solid var(--accent-hi);
  outline-offset:3px;
}
.card a:focus-visible .card-name{ color:var(--accent-hi); }

*::-webkit-scrollbar{ width:9px; height:9px; }
*::-webkit-scrollbar-track{ background:transparent; }
*::-webkit-scrollbar-thumb{ background:#232330; border-radius:20px; border:2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover{ background:#32323f; }

.ico{
  width:18px; height:18px; flex-shrink:0;
  fill:none; stroke:currentColor; stroke-width:1.9;
  stroke-linecap:round; stroke-linejoin:round;
}
.ico-fill{ fill:currentColor; stroke:none; }

/* ============================================================
   TOP BAR — floating pill
   ============================================================ */
.topbar{
  position:sticky; top:0; z-index:120;
  padding:10px var(--gutter) 0;
  animation:topbarIn .45s var(--ease-o) both;
}
@keyframes topbarIn{ from{ opacity:0; transform:translateY(-8px); } }

.topbar-inner{
  max-width:var(--maxw); margin:0 auto;
  height:52px; padding:0 8px 0 18px;
  display:flex; align-items:center; gap:14px;
  background:#000000;
  border-radius:var(--r-lg);
}
.topbar.scrolled .topbar-inner{
  background:#000000;
}

.menu-btn{
  display:grid; place-items:center;
  width:32px; height:32px; flex-shrink:0;
  border:none; background:transparent; color:var(--text);
  border-radius:var(--r-sm); cursor:pointer; transition:.16s;
}
.menu-btn:hover{ background:rgba(255,255,255,.08); }
.menu-btn .ico{ width:20px; height:20px; }

.brand{ display:flex; align-items:baseline; gap:1px; flex-shrink:0; }
.brand-text{
  font-size:23px; font-weight:500; letter-spacing:-.01em; color:#fff;
}
.brand-dot{ font-size:23px; font-weight:600; color:var(--accent); }

.search-btn{
  display:grid; place-items:center;
  width:34px; height:34px; flex-shrink:0;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(255,255,255,.04);
  color:var(--dim); border-radius:var(--r-pill);
  cursor:pointer; transition:.18s var(--ease);
}
.search-btn:hover{ color:#fff; border-color:var(--accent); background:rgba(11,132,255,.12); }

.nav-group{
  margin-left:auto;
  display:flex; align-items:center; gap:2px;
}
.nav-link{
  display:flex; align-items:center; gap:7px;
  height:36px; padding:0 15px;
  border-radius:var(--r-pill);
  font-size:13.5px; font-weight:400; color:var(--dim);
  transition:.18s var(--ease); white-space:nowrap;
}
.nav-link:hover{ color:#fff; background:rgba(255,255,255,.06); }
.nav-link.on{
  background:var(--accent); color:#fff; font-weight:500;
  box-shadow:0 3px 14px var(--accent-glow);
}
.nav-link .ico{ width:16px; height:16px; }

.nav-tools{
  display:flex; align-items:center; gap:6px;
  padding-left:10px; margin-left:6px;
  border-left:1px solid rgba(255,255,255,.08);
}
.tool-btn{
  display:grid; place-items:center;
  width:32px; height:32px;
  border:none; background:transparent; color:var(--dim);
  border-radius:var(--r-pill); cursor:pointer; transition:.18s;
}
.tool-btn:hover{ color:#fff; background:rgba(255,255,255,.08); }

.lang{ display:flex; align-items:center; gap:2px; }
.lang button{
  min-width:30px; height:26px; padding:0 8px;
  border:none; background:transparent;
  color:var(--faint); font-size:11.5px; font-weight:500;
  border-radius:var(--r-pill); cursor:pointer; transition:.18s;
}
.lang button:hover{ color:#fff; }
.lang button.on{ background:#fff; color:#000; font-weight:600; }

.avatar{
  display:grid; place-items:center;
  width:34px; height:34px; flex-shrink:0;
  background:var(--accent); color:#fff;
  border-radius:var(--r-pill); border:none; cursor:pointer;
  transition:.18s;
}
.avatar:hover{ background:var(--accent-hi); }
.avatar .badge{
  position:absolute; margin:-22px 0 0 22px;
  min-width:16px; height:16px; padding:0 4px;
  display:grid; place-items:center;
  background:var(--gold); color:#000;
  font-size:9.5px; font-weight:700; border-radius:9px;
}

/* drawer */
.drawer{
  position:fixed; inset:0; z-index:130;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(8px);
  animation:fade .2s var(--ease);
}
.drawer-panel{
  width:min(300px,82vw); height:100%;
  background:var(--surface); border-right:1px solid var(--line);
  padding:22px 16px;
  display:flex; flex-direction:column; gap:4px;
  animation:slideIn .28s var(--ease-o);
}
.drawer-panel a{
  display:flex; align-items:center; gap:12px;
  padding:13px 14px; border-radius:var(--r);
  font-size:15px; color:var(--dim); transition:.16s;
}
.drawer-panel a:hover{ background:var(--surface-2); color:#fff; }
@keyframes slideIn{ from{ transform:translateX(-100%); } }

/* ============================================================
   SPOTLIGHT SEARCH
   ============================================================ */
.spotlight{
  position:fixed; inset:0; z-index:200;
  display:flex; justify-content:center;
  padding:clamp(70px,14vh,150px) 20px 20px;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(14px) saturate(120%);
  -webkit-backdrop-filter:blur(14px) saturate(120%);
  animation:spotIn .22s var(--ease-o);
}
.spotlight.closing{ animation:spotOut .16s var(--ease) forwards; }
@keyframes spotIn{ from{ opacity:0; } }
@keyframes spotOut{ to{ opacity:0; } }

.spot-box{
  width:min(680px,100%); max-height:min(640px,72vh);
  display:flex; flex-direction:column;
  background:rgba(20,20,26,.72);
  backdrop-filter:blur(34px) saturate(180%);
  -webkit-backdrop-filter:blur(34px) saturate(180%);
  border:1px solid rgba(255,255,255,.13);
  border-radius:20px;
  box-shadow:
    0 28px 80px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.09);
  overflow:hidden;
  animation:spotRise .3s var(--ease-o);
}
@keyframes spotRise{ from{ opacity:0; transform:translateY(-16px) scale(.97); } }

.spot-field{
  display:flex; align-items:center; gap:13px;
  padding:18px 20px;
  border-bottom:1px solid rgba(255,255,255,.08);
  flex-shrink:0;
}
.spot-field .ico{ width:21px; height:21px; color:var(--dim); }
.spot-input{
  flex:1; min-width:0;
  background:none; border:none; outline:none;
  color:#fff; font-size:18px; font-weight:300; font-family:inherit;
}
.spot-input::placeholder{ color:var(--faint); font-weight:300; }
.spot-esc{
  padding:4px 9px; font-size:11px; font-weight:500;
  color:var(--dim); background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1); border-radius:6px;
}

.spot-body{ overflow-y:auto; padding:8px; }
.spot-head{
  padding:10px 12px 6px; font-size:10.5px; font-weight:600;
  letter-spacing:.11em; text-transform:uppercase; color:var(--faint);
}
.spot-item{
  display:flex; align-items:center; gap:14px;
  padding:9px 12px; border-radius:12px;
  cursor:pointer; transition:background .12s;
}
.spot-item:hover,.spot-item.active{ background:rgba(255,255,255,.09); }
.spot-item img{
  width:44px; height:62px; object-fit:cover;
  border-radius:7px; flex-shrink:0; background:var(--surface-2);
}
.spot-meta{ min-width:0; flex:1; }
.spot-title{ font-size:14.5px; font-weight:500; margin-bottom:4px; }
.spot-sub{ display:flex; gap:7px; align-items:center; flex-wrap:wrap; font-size:11.5px; color:var(--faint); }
.spot-empty{ padding:40px 20px; text-align:center; color:var(--faint); font-size:14px; }
.spot-foot{
  padding:11px 18px; border-top:1px solid rgba(255,255,255,.08);
  display:flex; gap:16px; font-size:11.5px; color:var(--faint); flex-shrink:0;
}
.spot-foot kbd{
  padding:2px 6px; margin-right:5px;
  background:rgba(255,255,255,.09); border-radius:4px;
  font-family:inherit; font-size:10.5px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 var(--gutter); }
.app{ min-height:70vh; }

.section{
  margin:38px 0;
  /* skip layout/paint for off-screen rails on the long home page;
     the estimate is corrected once a section is rendered */
  content-visibility:auto;
  contain-intrinsic-size:auto 420px;
}
/* the hero and first rows are always on screen — never defer them */
.hero{ content-visibility:visible; }

/* two-tone section heading */
.sec-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; margin-bottom:16px;
}
.sec-title{
  margin:0; font-size:clamp(19px,2vw,25px);
  font-family:var(--font-display);
  font-weight:400; letter-spacing:-.01em; color:#fff;
}
.sec-title b{ font-weight:400; color:var(--accent); }
.sec-more{
  display:flex; align-items:center; gap:5px;
  font-size:13px; color:var(--dim); transition:.16s;
}
.sec-more:hover{ color:var(--accent-hi); }
.sec-more .ico{ width:14px; height:14px; }

.sec-icon-head{ display:flex; align-items:center; gap:14px; }
.sec-icon{
  display:grid; place-items:center;
  width:42px; height:42px; flex-shrink:0;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-pill); color:var(--accent);
}

.rail-nav{ display:flex; gap:8px; }
.rail-btn{
  display:grid; place-items:center;
  width:38px; height:38px;
  background:var(--surface-2); border:1px solid var(--line);
  color:#fff; border-radius:var(--r-pill);
  cursor:pointer; transition:.18s var(--ease);
}
.rail-btn:hover{ background:var(--accent); border-color:var(--accent); }
.rail-btn:disabled{ opacity:.3; pointer-events:none; }

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position:relative; height:clamp(420px,58vh,600px);
  margin:8px 0 6px; overflow:hidden;
  border-radius:var(--r-lg);
  background:#000;
}
.hero-slide{
  position:absolute; inset:0;
  opacity:0; transition:opacity .8s var(--ease);
  pointer-events:none;
}
.hero-slide.on{ opacity:1; pointer-events:auto; }
.hero-bg{
  position:absolute; inset:0;
  background-image: var(--bg-desk);
  background-size:cover; background-position:center 20%;
  transform:scale(1.04);
  animation:drift 26s ease-in-out infinite alternate;
}
@keyframes drift{ to{ transform:scale(1.11) translateX(-1.2%); } }
.hero-scrim{
  position:absolute; inset:0;
  background:
    linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.75) 30%, rgba(0,0,0,.0) 50%, rgba(0,0,0,.4) 80%, rgba(0,0,0,.9) 100%),
    linear-gradient(0deg, #000 0%, transparent 40%),
    linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 15%);
}
.hero-body{
  position:relative; height:100%;
  padding:0 clamp(28px,4vw,62px);
  display:flex; flex-direction:column; justify-content:center;
}
.hero-in{ max-width:600px; }
.hero-title{
  font-size:clamp(30px,4.4vw,60px); font-weight:400;
  font-family:var(--font-display);
  line-height:1.06; letter-spacing:-.035em; margin:0 0 20px;
  text-wrap:balance;
}
.hero-pills{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.hero-desc{
  font-size:14px; line-height:1.72; color:var(--dim);
  margin:0 0 26px;
  display:-webkit-box; -webkit-line-clamp:3; line-clamp:3;
  -webkit-box-orient:vertical; overflow:hidden;
}
.hero-acts{ display:flex; gap:12px; align-items:center; }
.hero-play{
  display:grid; place-items:center;
  width:54px; height:54px; flex-shrink:0;
  background:var(--accent); color:#fff;
  border:none; border-radius:var(--r-pill); cursor:pointer;
  box-shadow:0 6px 22px var(--accent-glow);
  transition:.2s var(--ease);
}
.hero-play:hover{ background:var(--accent-hi); transform:scale(1.06); }
.hero-play .ico{ width:20px; height:20px; margin-left:2px; }

.hero-thumbs{
  position:absolute; right:clamp(20px,3vw,44px); bottom:34px;
  display:flex; gap:9px; z-index:4;
}
.hero-thumbs button{
  width:74px; height:44px; padding:0;
  border:2px solid transparent; border-radius:7px;
  background-size:cover; background-position:center;
  cursor:pointer; opacity:.45;
  transition:.28s var(--ease);
}
.hero-thumbs button:hover{ opacity:.8; }
.hero-thumbs button.on{
  opacity:1; border-color:#fff; transform:scale(1.14);
}

/* ============================================================
   PILLS & BUTTONS
   ============================================================ */
.pill{
  display:inline-flex; align-items:center; gap:5px;
  height:25px; padding:0 9px;
  border-radius:7px; font-size:11.5px; font-weight:500;
  white-space:nowrap;
}
.pill .ico{ width:12px; height:12px; stroke-width:2.2; }
.pill-cc   { background:var(--green-bg); color:var(--green); }
.pill-gold { background:var(--gold-bg);  color:var(--gold); }
.pill-hd   { background:var(--accent);   color:#fff; }
.pill-dark { background:rgba(255,255,255,.08); color:var(--dim); }
.pill-genre{
  background:rgba(255,255,255,.06); color:var(--dim);
  border:1px solid rgba(255,255,255,.08);
  height:27px; padding:0 11px; border-radius:var(--r-pill);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:42px; padding:0 20px;
  border:1px solid transparent; border-radius:var(--r-pill);
  background:rgba(255,255,255,.07); color:#fff;
  font-size:13.5px; font-weight:400; cursor:pointer;
  transition:.18s var(--ease); white-space:nowrap;
}
.btn:hover{ background:rgba(255,255,255,.13); }
.btn .ico{ width:16px; height:16px; }
.btn-primary{
  background:var(--accent); color:#fff;
}
.btn-primary:hover{ background:var(--accent-hi); }
.btn-sm{ height:34px; padding:0 15px; font-size:12.5px; }
.btn-circle{ width:40px; height:40px; padding:0; }
.btn.on{ background:var(--accent); }

.view-more{
  display:flex; justify-content:center; margin:26px 0;
}

/* tab pill group */
.tabs{
  display:flex; justify-content:center; margin:26px 0 20px;
}
.tabs-in{
  display:flex; gap:3px; padding:5px;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-pill);
  overflow-x:auto; max-width:100%; scrollbar-width:none;
}
.tabs-in::-webkit-scrollbar{ display:none; }
.tab{
  display:flex; align-items:center; gap:7px;
  height:36px; padding:0 18px;
  border:none; background:transparent;
  color:var(--dim); font-size:13px; border-radius:var(--r-pill);
  cursor:pointer; transition:.18s var(--ease); white-space:nowrap;
}
.tab:hover{ color:#fff; }
.tab.on{ background:var(--accent); color:#fff; box-shadow:0 3px 12px var(--accent-glow); }
.tab .ico{ width:15px; height:15px; }

.mini-tabs{ display:flex; gap:2px; padding:4px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-pill); }
.mini-tabs button{
  height:30px; padding:0 15px; border:none; background:transparent;
  color:var(--faint); font-size:12.5px; border-radius:var(--r-pill);
  cursor:pointer; transition:.16s;
}
.mini-tabs button:hover{ color:#fff; }
.mini-tabs button.on{ background:var(--accent); color:#fff; }

/* ============================================================
   CARD
   ============================================================ */
.grid{
  display:grid; gap:26px 16px;
  grid-template-columns:repeat(auto-fill,minmax(168px,1fr));
}

.card{ position:relative; display:block; }
.card-poster{
  position:relative; aspect-ratio:2/3;
  border-radius:var(--r); overflow:hidden;
  background:var(--surface-2);
  box-shadow:0 4px 14px rgba(0,0,0,.4);
}
.card-poster img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .5s var(--ease-o);
}
.card:hover .card-poster img{ transform:scale(1.04); }
.card-poster::after{
  content:""; position:absolute; inset:0; pointer-events:none;
}
.card-badge{ position:absolute; top:8px; left:8px; z-index:2; }

.card-info{ padding:10px 2px 0; }
.card-name{
  font-size:13.5px; font-weight:400; line-height:1.4; color:#fff;
  display:-webkit-box; -webkit-line-clamp:2; line-clamp:2;
  -webkit-box-orient:vertical; overflow:hidden;
  min-height:38px; /* 13.5 * 1.4 * 2 */
  transition:color .16s;
}
.card:hover .card-name{ color:var(--accent-hi); }
.card-meta{
  margin-top:4px; font-size:11.5px; color:var(--faint);
  display:flex; gap:6px; align-items:center;
}

.card-bar{ position:absolute; bottom:0; left:0; right:0; height:3px; background:rgba(0,0,0,.55); z-index:3; }
.card-bar i{ display:block; height:100%; background:var(--accent); }

/* ---------- hover preview (portal on <body>, never clipped) ---------- */
.preview{
  position:fixed; z-index:400;
  width:308px; padding:0 0 16px;
  background:rgba(18,18,23,.97);
  backdrop-filter:blur(24px) saturate(160%);
  -webkit-backdrop-filter:blur(24px) saturate(160%);
  border:1px solid rgba(255,255,255,.12);
  border-radius:var(--r-lg);
  box-shadow:0 28px 70px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.5);
  opacity:0; transform:scale(.9) translateY(6px);
  transform-origin:center center;
  transition:opacity .19s var(--ease), transform .26s var(--ease-o);
  pointer-events:none; will-change:transform,opacity;
}
.preview.show{ opacity:1; transform:scale(1) translateY(0); pointer-events:auto; }

.preview-img{
  height:124px; border-radius:var(--r-lg) var(--r-lg) 0 0;
  background-size:cover; background-position:center 22%;
  position:relative; overflow:hidden;
}
.preview-img::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg,rgba(18,18,23,.99),transparent 76%);
}
.preview.show .preview-img{ animation:previewPan 7s ease-out both; }
@keyframes previewPan{ from{ transform:scale(1); } to{ transform:scale(1.07); } }

.preview-body{ padding:0 16px; margin-top:-16px; position:relative; }
.preview-title{
  font-size:15.5px; font-weight:500; line-height:1.32; margin-bottom:10px;
  display:-webkit-box; -webkit-line-clamp:2; line-clamp:2;
  -webkit-box-orient:vertical; overflow:hidden;
}
.preview-pills,.preview-genres{ display:flex; gap:5px; flex-wrap:wrap; margin-bottom:9px; }
.preview-desc{
  font-size:12px; line-height:1.62; color:var(--dim); margin:2px 0 14px;
  display:-webkit-box; -webkit-line-clamp:3; line-clamp:3;
  -webkit-box-orient:vertical; overflow:hidden;
}
.preview-acts{ display:flex; gap:8px; align-items:center; }
.preview-acts .btn{ height:36px; font-size:12.5px; padding:0 16px; }
.preview-acts .btn-circle{ width:36px; padding:0; }

/* staggered children inside the preview */
.preview.show .preview-body > *{ animation:previewIn .34s var(--ease-o) both; }
.preview.show .preview-title  { animation-delay:.03s; }
.preview.show .preview-pills  { animation-delay:.06s; }
.preview.show .preview-genres { animation-delay:.09s; }
.preview.show .preview-desc   { animation-delay:.12s; }
.preview.show .preview-acts   { animation-delay:.15s; }
@keyframes previewIn{ from{ opacity:0; transform:translateY(7px); } }

/* ---------- rails ---------- */
.rail{
  display:grid; grid-auto-flow:column;
  grid-auto-columns:clamp(140px,12vw,180px);
  justify-content:start;
  gap:16px; overflow-x:auto; scroll-behavior:smooth;
  scroll-snap-type:x proximity; padding-bottom:6px;
  scrollbar-width:none;
}
.rail::-webkit-scrollbar{ display:none; }
.rail > *{ scroll-snap-align:start; }

/* ============================================================
   TOP 10 SHOWCASE RAIL
   ============================================================ */
.top10-head{
  display:flex; align-items:center; gap:26px; margin-bottom:8px; flex-wrap:wrap;
}
.top10-word{
  font-size:clamp(46px,7vw,92px); font-weight:700;
  letter-spacing:-.03em; line-height:.9;
  color:transparent;
  -webkit-text-stroke:2px var(--accent);
  user-select:none;
}
.top10-sub{
  font-size:clamp(11px,1.1vw,15px); font-weight:300;
  letter-spacing:.42em; color:#fff; line-height:1.9;
}

.top10-rail{
  display:grid; grid-auto-flow:column;
  grid-auto-columns:minmax(280px,1fr);
  gap:10px; overflow-x:auto; overflow-y:hidden; scroll-behavior:smooth;
  padding:14px 0 8px; scrollbar-width:none;
}
.top10-rail::-webkit-scrollbar{ display:none; }

.top10-item{ display:flex; align-items:flex-end; gap:4px; }
.top10-num{
  font-size:clamp(90px,9vw,140px); font-weight:700;
  line-height:.72; letter-spacing:-.06em;
  color:transparent; -webkit-text-stroke:2px var(--accent);
  user-select:none; flex-shrink:0;
}
.top10-item:nth-child(-n+3) .top10-num{ -webkit-text-stroke-color:var(--gold); }
.top10-card{ width:158px; flex-shrink:0; }
.top10-card .card-poster{ }

/* ============================================================
   CONTINUE WATCHING
   ============================================================ */
.cw-rail{
  display:grid; grid-auto-flow:column;
  grid-auto-columns:clamp(250px,22vw,330px);
  justify-content:start;
  gap:16px; overflow-x:auto; scrollbar-width:none; padding-bottom:6px;
}
.cw-rail::-webkit-scrollbar{ display:none; }
.cw-card{ position:relative; border-radius:var(--r); overflow:hidden; aspect-ratio:16/9; background:var(--surface-2); }
.cw-card img{ width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease-o); }
.cw-card:hover img{ transform:scale(1.05); }
.cw-scrim{
  position:absolute; inset:0;
  background:linear-gradient(0deg,rgba(0,0,0,.88) 4%,transparent 58%);
}
.cw-text{ position:absolute; left:14px; bottom:14px; right:14px; }
.cw-ep{ font-size:11.5px; color:var(--dim); margin-bottom:2px; }
.cw-name{ font-size:15px; font-weight:400; }
.cw-bar{ position:absolute; left:0; right:0; bottom:0; height:3px; background:rgba(255,255,255,.16); z-index:10; }
.cw-bar i{ display:block; height:100%; background:var(--accent); }

/* ============================================================
   SIDEBAR PANELS
   ============================================================ */
.split{
  display:grid; gap:30px;
  grid-template-columns:minmax(0,1fr) 400px;
  align-items:start;
}
.split > :nth-child(2) {
  position: sticky;
  top: 90px;
}

.panel{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.02);
}

/* genre grid */
.genre-grid{
  display:grid; gap:10px;
  grid-template-columns:repeat(3,1fr);
  padding:16px;
}
.genre-chip{
  display:flex; align-items:center; gap:9px;
  padding:11px 12px;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r); font-size:12.5px; color:var(--dim);
  transition:.18s var(--ease);
}
.genre-chip::before{
  content:""; width:3px; height:15px; border-radius:3px;
  background:var(--gc,var(--accent)); flex-shrink:0;
}
.genre-chip:hover{ color:#fff; border-color:var(--gc,var(--accent)); background:var(--surface-3); }

/* top 10 list */
.rank-list{ padding:8px; }
.rank-row{
  display:flex; align-items:center; gap:12px;
  padding:7px 10px; border-radius:var(--r);
  transition:background .16s;
}
.rank-row:hover{ background:var(--surface-2); }
.rank-n{
  width:32px; flex-shrink:0; text-align:center;
  font-size:20px; font-weight:600; color:var(--faint);
  font-variant-numeric:tabular-nums; letter-spacing:-.02em;
}
.rank-row:nth-child(-n+3) .rank-n{ color:var(--gold); }
.rank-row img{ width:40px; height:56px; object-fit:cover; border-radius:6px; flex-shrink:0; background:var(--surface-2); transition:transform .3s var(--ease-o); }
.rank-row:hover img{ transform:scale(1.06); }
.rank-meta{ min-width:0; flex:1; }
.rank-name{
  font-size:12.5px; line-height:1.4; margin-bottom:4px;
  display:-webkit-box; -webkit-line-clamp:2; line-clamp:2;
  -webkit-box-orient:vertical; overflow:hidden;
}
.rank-row:hover .rank-name{ color:var(--accent-hi); }

/* ============================================================
   SCHEDULE
   ============================================================ */
.clock-pill{
  display:inline-flex; align-items:center; gap:8px;
  height:36px; padding:0 16px;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-pill); font-size:12.5px; color:var(--dim);
}
.clock-dot{ width:7px; height:7px; border-radius:50%; background:var(--green); }

.day-strip{ display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.day-track{
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(120px,1fr);
  gap:10px; overflow-x:auto; flex:1; scrollbar-width:none;
}
.day-track::-webkit-scrollbar{ display:none; }
.day{
  padding:13px 8px; text-align:center;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r); cursor:pointer; transition:.18s var(--ease);
}
.day:hover{ border-color:var(--accent); }
.day.on{ background:var(--accent); border-color:var(--accent); }
.day-name{ font-size:11px; letter-spacing:.1em; color:var(--faint); text-transform:uppercase; }
.day.on .day-name{ color:rgba(255,255,255,.85); }
.day-num{ font-size:22px; font-weight:500; margin-top:2px; }

.sched-list{ display:flex; flex-direction:column; }
.sched-row{
  display:flex; align-items:center; gap:20px;
  padding:17px 20px;
  border-bottom:1px solid var(--line-soft);
  transition:background .16s;
}
.sched-row:last-child{ border-bottom:none; }
.sched-row:hover{ background:var(--surface-2); }
.sched-time{ width:56px; flex-shrink:0; font-size:13px; color:var(--accent); font-variant-numeric:tabular-nums; }
.sched-name{ flex:1; min-width:0; font-size:14px; }
.sched-ep{
  display:inline-flex; align-items:center; gap:6px;
  height:32px; padding:0 14px; flex-shrink:0;
  background:var(--surface-3); border:1px solid var(--line);
  border-radius:var(--r-pill); font-size:12.5px;
}
.sched-row:hover .sched-ep{ border-color:var(--accent); }
.sched-ep .ico{ width:12px; height:12px; }

/* ============================================================
   A-Z
   ============================================================ */
.az{
  display:grid; gap:34px; align-items:center;
  grid-template-columns:minmax(0,1fr) 300px;
  padding:44px 0 20px;
}
.az-title{ font-size:26px; font-weight:400; letter-spacing:.02em; margin:0 0 10px; }
.az-sub{
  display:flex; align-items:center; gap:10px;
  font-size:13px; color:var(--dim); margin-bottom:22px;
}
.az-sub::before{ content:""; width:3px; height:15px; background:var(--accent); border-radius:3px; }
.az-keys{ display:flex; flex-wrap:wrap; gap:8px; }
.az-key{
  min-width:42px; height:38px; padding:0 12px;
  display:grid; place-items:center;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-sm); font-size:13px; color:var(--dim);
  transition:.16s var(--ease);
}
.az-key:hover{ background:var(--accent); border-color:var(--accent); color:#fff; }
.az-mark{
  display:grid; place-items:center; height:140px;
  font-size:44px; font-weight:600; letter-spacing:-.02em;
  color:transparent; -webkit-text-stroke:1.5px var(--accent);
  user-select:none;
}

/* ============================================================
   SHARE STRIP
   ============================================================ */
.share{
  display:flex; align-items:center; gap:14px;
  padding:18px 0 22px;
}
.share-av{
  width:52px; height:52px; border-radius:var(--r-pill);
  display:grid; place-items:center; flex-shrink:0;
  background:linear-gradient(135deg,var(--accent),var(--accent-deep));
  color:#fff;
}
.share-t1{ font-size:14px; color:var(--accent); font-weight:500; }
.share-t2{ font-size:14px; color:var(--dim); }

/* ============================================================
   DETAIL / WATCH
   ============================================================ */
.detail-hero{ position:relative; }
.detail-bg{
  position:absolute; inset:0; height:440px;
  background-size:cover; background-position:center 22%;
}
.detail-bg::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg,#000 2%,rgba(0,0,0,.78) 52%,rgba(0,0,0,.6));
}
.detail-body{
  position:relative; padding-top:48px;
  display:grid; gap:34px; grid-template-columns:230px minmax(0,1fr);
  align-items:start;
}
.detail-poster{
  border-radius:var(--r-lg); overflow:hidden; aspect-ratio:2/3;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 20px 50px rgba(0,0,0,.6); background:var(--surface-2);
  animation:posterIn .6s var(--ease-o) both;
}
.detail-poster img{ width:100%; height:100%; object-fit:cover; }
@keyframes posterIn{ from{ opacity:0; transform:translateY(24px) scale(.96); } }
/* the text column cascades in beside the poster, one motion system with the home hero */
.detail-body > div:last-child > *{ animation:heroIn .6s var(--ease-o) both; }
.detail-body > div:last-child > .detail-title{ animation-delay:.08s; }
.detail-body > div:last-child > .detail-alt{ animation-delay:.14s; }
.detail-body > div:last-child > .detail-pills:nth-of-type(1){ animation-delay:.2s; }
.detail-body > div:last-child > .detail-pills:nth-of-type(2){ animation-delay:.26s; }
.detail-body > div:last-child > .detail-desc{ animation-delay:.32s; }
.detail-body > div:last-child > .detail-acts,
.detail-body > div:last-child > #acts{ animation-delay:.38s; }

.detail-title{
  font-size:clamp(26px,3.4vw,44px); font-weight:400;
  font-family:var(--font-display);
  letter-spacing:-.035em; line-height:1.1; margin:0 0 8px;
}
.detail-alt{ font-size:14px; color:var(--faint); margin:0 0 18px; }
.detail-pills{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.detail-desc{ font-size:14px; line-height:1.75; color:var(--dim); max-width:74ch; margin:0 0 22px; }
.detail-desc.clamp{ display:-webkit-box; -webkit-line-clamp:4; line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.desc-btn{ background:none; border:none; padding:0; color:var(--accent-hi); font-size:13px; cursor:pointer; margin:-12px 0 22px; }
.detail-acts{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:30px; }

.facts{
  display:grid; gap:1px; background:var(--line);
  border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
}
.fact{ background:var(--surface); padding:14px 16px; }
.fact-k{ font-size:10px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--faint); margin-bottom:5px; }
.fact-v{ font-size:13.5px; }

.ep-grid{ display:grid; gap:8px; grid-template-columns:repeat(auto-fill,minmax(54px,1fr)); }
.ep-btn{
  aspect-ratio:1; display:grid; place-items:center;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-sm); color:var(--dim); font-size:13px;
  transition:.16s var(--ease); font-variant-numeric:tabular-nums;
}
.ep-btn:hover{ background:var(--accent); border-color:var(--accent); color:#fff; transform:translateY(-2px); }
.ep-btn.seen{ color:var(--faint); background:var(--surface); }
.ep-btn.now{ background:var(--accent); border-color:var(--accent); color:#fff; }

.ep-list{ display:flex; flex-direction:column; gap:5px; }
.ep-row{
  display:flex; align-items:center; gap:14px;
  padding:12px 15px; border-radius:var(--r);
  background:var(--surface); border:1px solid var(--line-soft);
  transition:.16s var(--ease);
}
.ep-row:hover{ background:var(--surface-2); border-color:var(--accent); }
.ep-row.now{ background:rgba(11,132,255,.1); border-color:var(--accent); }
.ep-n{ width:32px; flex-shrink:0; text-align:center; font-size:14px; color:var(--faint); font-variant-numeric:tabular-nums; }
.ep-row.now .ep-n{ color:var(--accent-hi); }
.ep-t{ flex:1; min-width:0; font-size:13.5px; }
.ep-t small{ display:block; font-size:11.5px; color:var(--faint); margin-top:2px; }

.watch-grid{
  display:grid; gap:24px;
  grid-template-columns:minmax(0,1fr) 380px;
  align-items:start; padding-top:20px;
}
.player-shell{
  position:relative; aspect-ratio:16/9;
  background:#000; border:1px solid var(--line);
  border-radius:var(--r-lg); overflow:hidden;
}
.player-shell video{ width:100%; height:100%; display:block; background:#000; }
.player-empty{
  position:absolute; inset:0; display:grid; place-items:center;
  text-align:center; padding:30px;
  background:radial-gradient(circle at 50% 40%,#101018,#000);
}
.player-empty .ico{ width:40px; height:40px; color:var(--accent); margin-bottom:14px; }
.player-empty h3{ font-size:18px; font-weight:500; margin:0 0 8px; }
.player-empty p{ font-size:13.5px; line-height:1.65; color:var(--dim); margin:0 0 18px; max-width:420px; }
.player-bar{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:13px 16px; background:var(--surface);
  border:1px solid var(--line); border-top:none;
  border-radius:0 0 var(--r-lg) var(--r-lg);
}
.player-bar .sp{ flex:1; }
.pl-tog{
  background:none; border:none; padding:0 2px; cursor:pointer;
  font-size:12.5px; color:var(--faint); transition:.16s;
}
.pl-tog.on{ color:var(--accent); }
.pl-tog:hover{ color:#fff; }

/* ---------- custom player controls ---------- */
.pl-controls{
  position:absolute; left:0; right:0; bottom:0; z-index:5;
  padding:0 14px 10px;
  background:linear-gradient(0deg,rgba(0,0,0,.86),rgba(0,0,0,.35) 60%,transparent);
  opacity:0; transition:opacity .22s var(--ease);
}
.player-shell:hover .pl-controls,
.player-shell:focus-within .pl-controls{ opacity:1; }

.pl-scrub{
  position:relative; height:4px; margin:0 0 8px;
  background:rgba(255,255,255,.22); border-radius:3px;
  cursor:pointer; transition:height .15s;
}
.pl-scrub:hover{ height:6px; }
.pl-buf{
  position:absolute; inset:0 auto 0 0; width:0;
  background:rgba(255,255,255,.3); border-radius:3px;
}
.pl-played{
  position:absolute; inset:0 auto 0 0; width:0;
  background:var(--gold); border-radius:3px;
}
.pl-knob{
  position:absolute; top:50%; left:0;
  width:12px; height:12px; margin:-6px 0 0 -6px;
  background:var(--gold); border-radius:50%;
  opacity:0; transition:opacity .15s; pointer-events:none;
}
.pl-scrub:hover .pl-knob{ opacity:1; }

.pl-row{ display:flex; align-items:center; gap:6px; }
.pl-btn{
  display:grid; place-items:center;
  width:34px; height:34px; flex-shrink:0;
  border:none; background:transparent; color:#fff;
  border-radius:var(--r-sm); cursor:pointer; transition:.16s;
}
.pl-btn:hover{ background:rgba(255,255,255,.16); }
.pl-btn .ico{ width:19px; height:19px; }
.pl-time{
  font-size:12.5px; color:rgba(255,255,255,.85);
  font-variant-numeric:tabular-nums; margin-left:6px; white-space:nowrap;
}
.pl-time b{ font-weight:500; }
.pl-sp{ flex:1; }
.pl-vol{
  width:76px; height:4px; accent-color:#fff; cursor:pointer;
  background:rgba(255,255,255,.25); border-radius:3px; appearance:none;
}
.pl-vol::-webkit-slider-thumb{
  appearance:none; width:11px; height:11px; border-radius:50%;
  background:#fff; cursor:pointer;
}

/* control menus (quality / subtitles) */
.pl-menu-wrap{ position:relative; }
.pl-menu{
  position:absolute; bottom:calc(100% + 10px); right:0;
  min-width:150px; max-height:236px; overflow-y:auto;
  padding:6px;
  background:rgba(18,18,23,.97);
  backdrop-filter:blur(20px) saturate(160%);
  -webkit-backdrop-filter:blur(20px) saturate(160%);
  border:1px solid rgba(255,255,255,.12);
  border-radius:var(--r);
  box-shadow:0 16px 44px rgba(0,0,0,.7);
  animation:rise .18s var(--ease-o);
  z-index:8;
}
.pl-menu button{
  display:block; width:100%; text-align:left;
  padding:8px 11px; border:none; background:transparent;
  color:var(--dim); font-size:12.5px; border-radius:7px;
  cursor:pointer; transition:.14s; white-space:nowrap;
}
.pl-menu button:hover{ background:rgba(255,255,255,.1); color:#fff; }
.pl-menu button.on{ color:var(--accent-hi); }

video::cue{
  background:rgba(0,0,0,.72);
  color:#fff; font-family:Poppins,sans-serif;
  font-size:.92em; line-height:1.4;
}
@media (max-width:700px){
  .pl-vol{ display:none; }
  .pl-time{ font-size:11.5px; }
}

.ep-panel{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); overflow:hidden;
  display:flex; flex-direction:column; max-height:76vh;
}
.ep-panel-h{
  padding:15px 17px; border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
}
.ep-panel-h h3{ margin:0; font-size:15px; font-weight:500; }
.ep-panel-b{ overflow-y:auto; padding:8px; }

/* ============================================================
   FILTERS
   ============================================================ */
.filters{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:18px; margin-bottom:26px;
  box-shadow:0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.02);
}
.filter-grid{ display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); }
.field label{
  display:block; font-size:10px; font-weight:600; letter-spacing:.1em;
  text-transform:uppercase; color:var(--faint); margin-bottom:7px;
}
.field select,.field input{
  width:100%; height:40px; padding:0 12px;
  background:var(--surface-2); color:#fff;
  border:1px solid var(--line); border-radius:var(--r);
  font-size:13px; font-family:inherit; outline:none; cursor:pointer;
  transition:.16s var(--ease);
}
.field select:focus,.field input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }

/* ============================================================
   STATES
   ============================================================ */
.skeleton{
  background:linear-gradient(100deg,var(--surface) 30%,var(--surface-3) 50%,var(--surface) 70%);
  background-size:220% 100%; animation:shimmer 1.4s linear infinite;
  border-radius:var(--r);
}
@keyframes shimmer{ to{ background-position:-220% 0; } }
.sk-poster{ aspect-ratio:2/3; }
.sk-line{ height:11px; margin-top:10px; }
.sk-line.s{ width:56%; }

/* skeleton cards fade in gently rather than snapping */
.skeleton{ animation:shimmer 1.4s linear infinite, loaderIn .5s var(--ease-o) both; }

.empty{ text-align:center; padding:70px 20px; color:var(--faint); }
.empty .ico{ width:40px; height:40px; margin-bottom:14px; }
.empty h3{ font-size:18px; font-weight:500; color:#fff; margin:0 0 8px; }
.empty p{ font-size:13.5px; margin:0 auto 20px; max-width:400px; line-height:1.65; }

.loader{
  display:grid; place-items:center; padding:70px;
  animation:loaderIn .4s var(--ease-o) both;
}
@keyframes loaderIn{ from{ opacity:0; } }

.spinner{
  width:30px; height:30px; border-radius:50%;
  border:3px solid var(--surface-3); border-top-color:var(--accent);
  animation:spin .7s linear infinite;
  position:relative;
}
.spinner::after{
  content:""; position:absolute; inset:-8px;
  border-radius:50%; border:2px solid var(--accent);
  opacity:.2; animation:spinPulse 2s ease-out infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
@keyframes spinPulse{
  0%{ opacity:.4; transform:scale(.9); }
  50%{ opacity:0; transform:scale(1.4); }
  100%{ opacity:0; }
}
@keyframes fade{ from{ opacity:0; } }
@keyframes rise{ from{ opacity:0; transform:translateY(12px); } }
.rise{ animation:rise .4s var(--ease-o) both; }

/* ============================================================
   MOTION SYSTEM
   ============================================================ */

/* scroll reveal — set by IntersectionObserver in ui.js */
.reveal{ opacity:0; transform:translateY(22px); }
.reveal.in{
  opacity:1; transform:none;
  transition:opacity .55s var(--ease-o), transform .65s var(--ease-o);
}

/* staggered card entrance within a grid/rail */
.grid > *, .rail > *, .top10-rail > *, .cw-rail > *{
  animation:cardIn .5s var(--ease-o) both;
  animation-delay:calc(var(--i,0) * 38ms);
}
@keyframes cardIn{ from{ opacity:0; transform:translateY(16px) scale(.97); } }

/* hero copy */
.hero-slide.on .hero-title{ animation:heroIn .6s var(--ease-o) both; animation-delay:.05s; }
.hero-slide.on .hero-pills{ animation:heroIn .6s var(--ease-o) both; animation-delay:.13s; }
.hero-slide.on .hero-desc { animation:heroIn .6s var(--ease-o) both; animation-delay:.2s; }
.hero-slide.on .hero-acts { animation:heroIn .6s var(--ease-o) both; animation-delay:.27s; }
@keyframes heroIn{ from{ opacity:0; transform:translateY(20px); } }

/* micro-interactions */
.card-poster{ transition:transform .3s var(--ease-o), box-shadow .3s var(--ease); }
.card:hover .card-poster{
  transform:translateY(-4px);
  box-shadow:0 14px 32px rgba(0,0,0,.6);
}
.cw-card{ transition:transform .3s var(--ease-o); }
.cw-card:hover{ transform:translateY(-4px); }

.btn:active,.tab:active,.rail-btn:active,.az-key:active{ transform:scale(.96); }
.btn-primary:hover{ transform:translateY(-1px); }

.sec-icon{ transition:transform .35s var(--ease-o), color .2s; }
.section:hover > .sec-head .sec-icon{ transform:rotate(-14deg) scale(1.06); }

.top10-num{ transition:transform .35s var(--ease-o), -webkit-text-stroke-color .25s; }
.top10-item:hover .top10-num{ transform:translateY(-5px) scale(1.04); }

.genre-chip{ transition:transform .2s var(--ease-o), color .18s, border-color .18s, background .18s; }
.genre-chip:hover{ transform:translateX(3px); }

.sched-row{ transition:background .16s, transform .22s var(--ease-o); }
.sched-row:hover{ transform:translateX(6px); }

/* When an overlay (spotlight / drawer) is open, its full-screen backdrop-filter
   must re-blur whatever moves beneath it every frame. Freezing the always-on
   background animations underneath lets the browser cache the blur — this is
   the difference between a smooth overlay and a constant full-screen repaint. */
body.overlay-open .hero-bg,
body.overlay-open .hero-play::after,
body.overlay-open .spinner::after{ animation-play-state:paused; }

.hero-play{ position:relative; }
.hero-play::after{
  content:""; position:absolute; inset:-6px;
  border-radius:50%; border:2px solid var(--accent);
  opacity:0; animation:pulse 2.6s ease-out infinite;
  pointer-events:none;
}
@keyframes pulse{
  0%{ opacity:.55; transform:scale(.9); }
  70%{ opacity:0; transform:scale(1.35); }
  100%{ opacity:0; }
}

@media (prefers-reduced-motion:reduce){
  .reveal{ opacity:1; transform:none; }
  .grid > *, .rail > *, .top10-rail > *, .cw-rail > *{ animation:none; }
  .hero-play::after{ animation:none; }
}

.char-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px;
}

.toasts{
  position:fixed; bottom:24px; right:24px; z-index:10000;
  display:flex; flex-direction:column; gap:9px; align-items:flex-end;
}
.toast{
  display:flex; align-items:center; gap:10px;
  padding:13px 17px; border-radius:var(--r);
  background:rgba(22,22,28,.94); backdrop-filter:blur(16px);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 14px 40px rgba(0,0,0,.6);
  font-size:13.5px; animation:rise .3s var(--ease-o);
}
.toast .ico{ color:var(--accent-hi); }
.toast-shuffle span{
  font-family:'SF Mono','Monaco','Cascadia Code','Roboto Mono','Courier New',monospace;
  font-size:13px;
  letter-spacing:0.02em;
  min-width:240px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer{ margin-top:80px; border-top:1px solid var(--line); }
.footer-in{
  max-width:var(--maxw); margin:0 auto;
  padding:40px var(--gutter);
  display:flex; flex-direction:column; align-items:center; gap:20px;
}
.footer-brand{ display:flex; align-items:baseline; gap:1px; }

.footer-social{ display:flex; gap:12px; }
.social-btn{
  display:grid; place-items:center;
  width:42px; height:42px; border-radius:var(--r-pill);
  background:var(--surface-2); border:1px solid var(--line);
  color:var(--dim);
  transition:transform .2s var(--ease-o), background .2s, border-color .2s, color .2s;
}
.social-btn:hover{
  transform:translateY(-3px);
  background:var(--accent); border-color:var(--accent); color:#fff;
}
.social-btn .ico{ width:20px; height:20px; }

.footer-copy{ font-size:12.5px; color:var(--faint); }
.footer-copy a{ color:var(--accent-hi); }

.watch-layout {
  display: grid; gap: 16px;
  grid-template-columns: 320px minmax(0,1fr);
  align-items: start;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1400px){
  .split{ grid-template-columns:minmax(0,1fr) 340px; }
  .watch-grid{ grid-template-columns:minmax(0,1fr) 330px; }
}
@media (max-width:1100px){
  .split{ grid-template-columns:1fr; }
  .watch-layout { display: flex; flex-direction: column; }
  .ep-panel{ max-height:none; }
  .az{ grid-template-columns:1fr; }
  .az-mark{ display:none; }
  /* Enforce Burger Menu exclusively */
  .nav-group{ display:none; }
  .hide-on-mobile { display: none !important; }
  /* On watch page, un-hide the lower content section */
  .wrap .split.hide-on-mobile { display: flex !important; flex-direction: column; gap: 0; }
  .wrap section.section.hide-on-mobile { display: block !important; }
}
@media (max-width:860px){
  .detail-body{ grid-template-columns:150px minmax(0,1fr); gap:22px; }
  .genre-grid{ grid-template-columns:repeat(2,1fr); }
  .hero-title{ font-size:36px; }
}
@media (max-width:640px){
  :root{ --nav-h:60px; }
  .grid{ grid-template-columns:repeat(auto-fill,minmax(116px,1fr)); gap:20px 10px; }
  .rail{ grid-auto-columns:minmax(126px,1fr); gap:10px; }
  .hero{ height:75vh; border-radius:0; margin:0 calc(var(--gutter) * -1); }
  .hero-bg{ background-image: var(--bg-mob); background-size: cover; background-position: center; }
  .hero-body{ padding-top: 0; padding-bottom: 40px; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; text-align:center; }
  .hero-in { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
  .hero-title{ font-size:32px; margin-bottom:12px; line-height: 1.1; }
  .hero-desc{ display:none; }
  .hero-acts{ justify-content:center; gap: 16px; width: 100%; }
  .hero-play { width: 64px; height: 64px; background: var(--accent); color: #fff; }
  .hero-acts .btn { flex: none; width: auto; padding: 0 24px; border-radius: 30px; }
  .hero-thumbs{ display:none; }
  .preview{ display:none; }

  /* DETAIL PAGE (ENMA STYLE) */
  .detail-body{ grid-template-columns:1fr; gap: 20px; }
  .detail-poster{ width:60%; max-width:240px; margin: 0 auto; }
  .detail-body > div:last-child { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .detail-title { font-size: 28px; line-height: 1.2; text-align: center; }
  .detail-alt { font-size: 14px; text-align: center; }
  .detail-pills { justify-content: center; margin-bottom: 24px; }
  .detail-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
  .detail-acts .btn.primary { grid-column: 1 / -1; height: 50px; font-size: 16px; border-radius: 25px; background: #fff; color: #000; }
  
  .btn-box { width: 44px; height: 36px; display: grid; place-items: center; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; color: var(--accent); transition: .2s; cursor: pointer; text-decoration: none; }
  .btn-box.disabled { opacity: 0.3; pointer-events: none; }
  .btn-box:hover { background: rgba(11,132,255,0.12); border-color: var(--accent); }
  
  .server-panel { display: grid; gap: 14px; grid-template-columns: 290px minmax(0,1fr); margin-top: 14px; }
  .server-info { background: linear-gradient(135deg, rgba(11,132,255,.22), rgba(11,132,255,.06)); border: 1px solid rgba(11,132,255,.28); border-radius: var(--r-lg); padding: 20px; text-align: center; display: grid; place-content: center; gap: 4px; }
  .server-opts { background: var(--surface-1); padding: 16px; border-radius: var(--r-lg); display: grid; gap: 12px; align-content: center; }
  .srv-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .srv-list { display: flex; gap: 7px; flex-wrap: wrap; }
  
  /* WATCH PAGE (ENMA STYLE) */
  .player-shell { border-radius: 0; border: none; margin: 0 calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); max-width: none; }
  .player-bar { border-radius: 0; border-left: none; border-right: none; margin: 0 calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); max-width: none; padding: 12px var(--gutter); border: none; background: transparent; }
  .server-panel { grid-template-columns: 1fr; gap: 0; margin-top: 20px; }
  .server-info { background: transparent; border: none; padding: 0; margin-bottom: 20px; text-align: center; }
  .server-opts { background: transparent; padding: 0; border: none; gap: 14px; }
  .srv-list .btn { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); height: 38px; border-radius: 8px; }
  /* Episode list Enma style */
  .ep-row { background: var(--surface-1); border: none; border-bottom: 1px solid rgba(255,255,255,0.04); border-radius: 0; padding: 14px 16px; gap: 14px; align-items: center; }
  .ep-row:first-child { border-radius: var(--r) var(--r) 0 0; }
  .ep-row:last-child { border-bottom: none; border-radius: 0 0 var(--r) var(--r); }
  .ep-row.now { background: rgba(11,132,255,.08); border-color: transparent; }
  .ep-n { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; background: rgba(255,255,255,0.06); border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--dim); border: none; text-align: center; }
  .ep-row.now .ep-n { background: rgba(11,132,255,0.2); color: var(--accent-hi); }
  .ep-t { font-size: 14px; color: #fff; }
  /* Characters Enma style: stacked pairs */
  .char-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 0 !important; }
  .char-grid > div { border-bottom: 1px solid rgba(255,255,255,0.05); border: none !important; border-bottom: 1px solid rgba(255,255,255,0.05) !important; border-radius: 0 !important; background: transparent !important; }
  .char-grid > div:last-child { border-bottom: none !important; }
  .top10-head{ gap: 14px; margin-bottom: 20px; }
  .top10-word{ font-size: 32px; -webkit-text-stroke: 1.5px var(--accent); }
  .top10-rail { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding-bottom: 20px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); gap: 16px; scrollbar-width: none; }
  .top10-rail::-webkit-scrollbar { display: none; }
  .top10-item { position: relative; display: block; }
  .top10-item .top10-num { position: absolute; bottom: 24px; left: -2px; font-size: 72px; z-index: 2; pointer-events: none; -webkit-text-stroke: 2px var(--accent); color: transparent; top: auto; right: auto; text-shadow: none; font-weight: 800; transform: none; letter-spacing: -0.06em; line-height: 1; }
  .top10-card{ flex: 0 0 160px; scroll-snap-align: start; flex-direction: column; height: 260px; position: relative; }
  .top10-card img { width: 100%; height: 210px; object-fit: cover; border-radius: var(--r); }
  .top10-card .top10-info { padding-top: 8px; z-index: 3; position: relative; }
  .top10-card .top10-title { font-size: 13px; line-height: 1.4; -webkit-line-clamp: 2; }
  .top10-card .top10-meta { display: none; }
  .brand-text,.brand-dot{ font-size:20px; }
  .spot-box{ max-height:80vh; }
  .genre-grid{ grid-template-columns:1fr; }
  .char-grid{ grid-template-columns:1fr; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important; animation-iteration-count:1!important;
    transition-duration:.01ms!important; scroll-behavior:auto!important;
  }
}

/* ============================================================
   THEMES PAGE
   ============================================================ */
.theme-swatch{
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:16px; border-radius:var(--r); background:var(--surface-2);
  border:2px solid transparent; cursor:pointer;
  transition:transform .2s var(--ease-o), border-color .2s, background .2s;
  width:130px; box-sizing:border-box;
}
.theme-swatch:hover{ transform:translateY(-2px); background:var(--surface-3); }
.theme-swatch.active{ border-color:var(--accent); }
.theme-dot{
  width:48px; height:48px; border-radius:50%;
  transition:transform .25s var(--ease-o);
}
.theme-swatch:hover .theme-dot{ transform:scale(1.08); }
.theme-swatch span{
  font-size:13px; font-weight:500; color:var(--text); margin-top:4px;
}

.font-option{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-radius:var(--r);
  background:var(--surface-2); border:2px solid transparent;
  cursor:pointer; transition:transform .2s var(--ease-o), border-color .2s, background .2s;
  text-align:left;
}
.font-option:hover{ transform:translateX(4px); background:var(--surface-3); }
.font-option.active{ border-color:var(--accent); }
.font-name{ font-size:15px; font-weight:500; color:var(--text); margin-bottom:4px; }
.font-desc{ font-size:13px; color:var(--dim); }
.font-check{
  opacity:0; transition:opacity .2s, transform .2s var(--ease-o);
  color:var(--accent); width:20px; height:20px;
}
.font-option.active .font-check{ opacity:1; transform:scale(1.1); }

/* ============================================================
   WATCHLIST PAGE
   ============================================================ */
.watchlist-stats{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:14px; margin-bottom:28px; padding:24px;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-lg);
}
.stat-item{
  text-align:center; padding:12px;
  border-radius:var(--r-sm); background:var(--surface);
  transition:transform .2s var(--ease-o), background .2s;
}
.stat-item:hover{
  transform:translateY(-2px); background:var(--surface-3);
}
.stat-value{
  font-size:28px; font-weight:500; color:var(--accent);
  margin-bottom:6px; font-family:var(--font-display);
}
.stat-label{
  font-size:12px; font-weight:500; color:var(--dim);
  text-transform:uppercase; letter-spacing:.03em;
}

.stat-actions{
  display:flex; align-items:center; justify-content:center;
  background:var(--surface-2);
}
.stat-action-btn{
  width:48px; height:48px; border-radius:50%;
  background:var(--accent); border:none; color:#fff;
  cursor:pointer; display:grid; place-items:center;
  transition:transform .2s var(--ease-o), background .2s;
}
.stat-action-btn:hover{
  background:var(--accent-hi); transform:scale(1.1);
}
.stat-action-btn .ico{ width:20px; height:20px; }

.watchlist-controls{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:28px; gap:16px; flex-wrap:wrap;
}
.watchlist-tabs{
  display:flex; gap:8px;
}
.watchlist-tab{
  padding:10px 18px; border-radius:var(--r-sm);
  background:var(--surface-2); border:1px solid transparent;
  font-size:14px; font-weight:500; color:var(--dim);
  cursor:pointer; transition:all .2s;
}
.watchlist-tab:hover{ background:var(--surface-3); color:var(--text); }
.watchlist-tab.active{
  background:var(--accent); color:#fff;
  border-color:var(--accent);
}

.watchlist-right{
  display:flex; gap:10px; align-items:center;
}
.watchlist-search{
  padding:10px 14px; border-radius:var(--r-sm);
  background:var(--surface-2); border:1px solid var(--line);
  color:var(--text); font-size:14px; width:220px;
  transition:border-color .2s, background .2s;
}
.watchlist-search::placeholder{ color:var(--faint); }
.watchlist-search:hover{ background:var(--surface-3); }
.watchlist-search:focus{
  outline:none; border-color:var(--accent);
}

.sort-select{
  padding:10px 14px; border-radius:var(--r-sm);
  background:var(--surface-2); border:1px solid var(--line);
  color:var(--text); font-size:14px; cursor:pointer;
  transition:border-color .2s, background .2s;
}
.sort-select:hover{ background:var(--surface-3); border-color:var(--line-soft); }
.sort-select:focus{ outline:2px solid var(--accent); outline-offset:2px; }

.watchlist-card{ position:relative; }
.watchlist-actions{
  position:absolute; top:8px; right:8px; z-index:10;
  display:flex; gap:6px; opacity:0;
  transition:opacity .2s;
}
.watchlist-card:hover .watchlist-actions{ opacity:1; }
.watchlist-action-btn{
  width:34px; height:34px; border-radius:var(--r-sm);
  background:rgba(0,0,0,.75); backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.1);
  color:var(--text); cursor:pointer;
  display:grid; place-items:center;
  transition:transform .2s var(--ease-o), background .2s, border-color .2s;
}
.watchlist-action-btn:hover{
  background:rgba(0,0,0,.9); border-color:var(--accent);
  transform:scale(1.08);
}
.watchlist-action-btn .ico{ width:16px; height:16px; }

.card-rating{
  position:absolute; bottom:8px; left:8px; right:8px;
  background:rgba(0,0,0,.85); backdrop-filter:blur(8px);
  padding:6px 8px; border-radius:6px;
  font-size:13px; text-align:center;
}
.rating-stars{ color:var(--gold); letter-spacing:1px; }

/* ============================================================
   RATING MODAL
   ============================================================ */
.rating-modal{
  position:fixed; inset:0; z-index:400;
  background:rgba(0,0,0,.75); backdrop-filter:blur(8px);
  display:grid; place-items:center; padding:20px;
  animation:fadeIn .2s var(--ease-o);
}
.rating-modal-content{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); max-width:500px; width:100%;
  box-shadow:0 20px 60px rgba(0,0,0,.8);
  animation:modalSlideIn .3s var(--ease-o);
}
@keyframes modalSlideIn{ from{ opacity:0; transform:translateY(20px) scale(.96); } }
.rating-modal-header{
  display:flex; justify-content:space-between; align-items:center;
  padding:20px 24px; border-bottom:1px solid var(--line);
}
.rating-modal-header h3{
  font-size:18px; font-weight:500; margin:0; color:var(--text);
}
.rating-modal-close{
  width:32px; height:32px; border-radius:var(--r-sm);
  background:transparent; border:none; color:var(--dim);
  cursor:pointer; display:grid; place-items:center;
  transition:background .2s, color .2s;
}
.rating-modal-close:hover{ background:var(--surface-2); color:var(--text); }
.rating-modal-close .ico{ width:20px; height:20px; }

.rating-modal-body{ padding:24px; }
.rating-stars-input{
  display:flex; gap:8px; justify-content:center; margin-bottom:20px;
}
.star-btn{
  font-size:40px; color:var(--line); background:none; border:none;
  cursor:pointer; transition:color .15s, transform .2s var(--ease-o);
  line-height:1;
}
.star-btn:hover{ transform:scale(1.15); }
.star-btn.active{ color:var(--gold); }

.rating-comment{
  width:100%; min-height:100px; padding:12px 14px;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r); color:var(--text); font-size:14px;
  font-family:inherit; resize:vertical; margin-bottom:20px;
  transition:border-color .2s;
}
.rating-comment:focus{
  outline:none; border-color:var(--accent);
}
.rating-comment::placeholder{ color:var(--faint); }

.rating-modal-actions{
  display:flex; gap:10px; justify-content:flex-end;
}
.rating-delete{ background:var(--surface-2); color:#ef4444; }
.rating-delete:hover{ background:#ef4444; color:#fff; }

/* ============================================================
   POST-WATCH RATING TOAST
   ============================================================ */
.post-watch-toast{
  background:rgba(22,22,28,.96); backdrop-filter:blur(16px);
  border:1px solid rgba(255,255,255,.12); border-radius:var(--r-lg);
  box-shadow:0 16px 48px rgba(0,0,0,.7);
  padding:20px; max-width:380px;
  animation:rise .35s var(--ease-o);
}
.post-watch-content{
  display:flex; gap:14px; align-items:center; margin-bottom:16px;
}
.post-watch-icon{
  width:44px; height:44px; border-radius:50%;
  background:linear-gradient(135deg, var(--accent), var(--accent-deep));
  display:grid; place-items:center; flex-shrink:0;
  color:#fff;
}
.post-watch-icon .ico{ width:22px; height:22px; }
.post-watch-title{
  font-size:15px; font-weight:500; color:var(--text); margin-bottom:4px;
}
.post-watch-subtitle{
  font-size:13px; color:var(--dim);
}
.post-watch-actions{
  display:flex; gap:8px;
}
.post-watch-btn{
  flex:1; padding:10px 16px; border-radius:var(--r-sm);
  font-size:13px; font-weight:500; cursor:pointer;
  transition:transform .2s var(--ease-o), background .2s, color .2s;
}
.post-watch-rate{
  background:var(--accent); color:#fff; border:none;
}
.post-watch-rate:hover{
  background:var(--accent-hi); transform:translateY(-1px);
}
.post-watch-dismiss{
  background:var(--surface-2); color:var(--dim); border:1px solid var(--line);
}
.post-watch-dismiss:hover{
  background:var(--surface-3); color:var(--text);
}
