:root {
  --bg: #08090e;
  --bg-surface: #0e111a;
  --bg-glass: rgba(14, 17, 26, 0.84);
  --bg-elev: #131824;
  --bg-card: #161b28;
  --bg-hover: #1d2436;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f1ea;
  --text-muted: #9aa5b8;
  --text-dim: #667389;
  --accent: #ff6b2b;
  --accent-hover: #ff824a;
  --accent-soft: rgba(255, 107, 43, 0.16);
  --gold: #f5b942;
  --sub: #38bdf8;
  --dub: #a78bfa;
  --green: #2dd4bf;
  --radius: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --rail-w: 78px;
  --max-w: 1460px;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-sans: "Segoe UI Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body {
  background-image:
    radial-gradient(ellipse 80% 45% at 60% -10%, rgba(255, 107, 43, 0.08), transparent 65%),
    radial-gradient(ellipse 60% 40% at 15% 15%, rgba(56, 189, 248, 0.045), transparent 60%);
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.mono-sm { font-family: var(--font-mono); font-size: 0.78rem; }

/* Pro Cinema Entrance Stage */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: #06070c;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s ease;
}
.boot-splash.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-splash.done .splash-inner {
  transform: scale(1.04);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.splash-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.splash-aurora {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(ellipse 48% 42% at 24% 28%, rgba(255, 107, 43, 0.22), transparent 68%),
    radial-gradient(ellipse 46% 42% at 76% 72%, rgba(92, 128, 255, 0.16), transparent 68%),
    radial-gradient(circle at 50% 50%, rgba(245, 185, 66, 0.10), transparent 55%);
  filter: blur(28px);
  animation: splashAuroraDrift 9s ease-in-out infinite alternate;
}
@keyframes splashAuroraDrift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.07); }
}
.splash-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 15%, transparent 90%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 15%, transparent 90%);
}
.splash-reel-wall {
  position: absolute;
  top: -8%;
  bottom: -8%;
  width: clamp(130px, 16vw, 230px);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  opacity: 0.22;
  filter: saturate(1.1) contrast(1.05);
}
.splash-reel-wall img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}
.splash-reel-left {
  left: clamp(1rem, 4vw, 4.5rem);
  transform: rotate(-6deg);
  animation: splashReelUp 14s linear infinite alternate;
}
.splash-reel-right {
  right: clamp(1rem, 4vw, 4.5rem);
  transform: rotate(6deg);
  animation: splashReelDown 14s linear infinite alternate;
}
@keyframes splashReelUp {
  0% { transform: rotate(-6deg) translateY(0); }
  100% { transform: rotate(-6deg) translateY(-6%); }
}
@keyframes splashReelDown {
  0% { transform: rotate(6deg) translateY(-6%); }
  100% { transform: rotate(6deg) translateY(0); }
}
.splash-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 22%, rgba(6, 7, 12, 0.78) 68%, #06070c 100%);
}
.splash-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.78rem;
  padding: 2rem 2.2rem;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 35%, rgba(20, 24, 38, 0.65), rgba(10, 12, 20, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(255, 107, 43, 0.08);
  animation: splashEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes splashEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.splash-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.24rem 0.75rem;
  border-radius: 999px;
  background: rgba(245, 185, 66, 0.1);
  border: 1px solid rgba(245, 185, 66, 0.24);
}
.splash-mark {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  animation: splashFloat 2.2s ease-in-out infinite alternate;
}
.splash-orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.splash-orbit-outer {
  inset: 0;
  border: 1.5px solid rgba(255, 107, 43, 0.25);
  border-top-color: var(--accent);
  border-right-color: rgba(245, 185, 66, 0.75);
  animation: splashSpin 2.8s linear infinite;
}
.splash-orbit-inner {
  inset: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  animation: splashSpinRev 6s linear infinite;
}
@keyframes splashSpin {
  to { transform: rotate(360deg); }
}
@keyframes splashSpinRev {
  to { transform: rotate(-360deg); }
}
.splash-face-reel {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: #0d1018;
  border: 2px solid rgba(255, 107, 43, 0.45);
  box-shadow: 0 0 28px rgba(255, 107, 43, 0.28);
}
.splash-face-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
@keyframes splashFloat {
  from { transform: translateY(2px) scale(0.98); }
  to { transform: translateY(-3px) scale(1.02); }
}
.splash-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  font-size: 1.48rem;
  color: #fff;
  text-shadow: 0 4px 20px rgba(255, 107, 43, 0.25);
}
.splash-wordmark span { color: var(--accent); }
.splash-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.splash-track {
  position: relative;
  width: 220px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.25rem;
}
.splash-fill {
  position: relative;
  width: 28%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
  background-size: 200% 100%;
  animation: splashBarFlow 1.4s linear infinite;
  transition: width 0.28s ease;
}
@keyframes splashBarFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.splash-status {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
  letter-spacing: 0.04em;
}
@media (max-width: 720px) {
  .splash-reel-wall {
    width: 96px;
    opacity: 0.14;
  }
  .splash-reel-left { left: -18px; }
  .splash-reel-right { right: -18px; }
  .splash-inner {
    margin: 0 1rem;
    padding: 1.65rem 1.5rem;
  }
}

/* App Frame: Left Cinema Rail + Fluid Workspace */
.app-frame {
  display: flex;
  min-height: 100vh;
}

.side-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 75;
  background: rgba(10, 12, 19, 0.92);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.5rem 1.25rem;
  gap: 1.5rem;
}

.brand-monogram {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  grid-auto-flow: column;
  place-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: border-color 0.16s, background 0.16s;
}
.brand-monogram span { color: var(--accent); }
.rail-brand:hover .brand-monogram {
  border-color: rgba(255, 107, 43, 0.45);
  background: var(--accent-soft);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  align-items: center;
}
.rail-bottom {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
}
.rail-item {
  width: 62px;
  padding: 0.58rem 0.25rem;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
  background: transparent;
  cursor: pointer;
}
.rail-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.rail-item.active {
  color: #fff;
  background: var(--accent-soft);
  border-color: rgba(255, 107, 43, 0.38);
}
.rail-icon-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}
.badge-pill {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  padding: 0 0.28rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.workspace-col {
  flex: 1;
  min-width: 0;
  margin-left: var(--rail-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Slim Sticky Top Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 65;
  background: rgba(8, 9, 14, 0.8);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.65rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand-header {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  min-width: 0;
}
.face-reel {
  position: relative;
  width: 46px;
  height: 46px;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  -webkit-mask-image: radial-gradient(ellipse 68% 68% at 50% 48%, #000 54%, rgba(0, 0, 0, 0.45) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 68% 68% at 50% 48%, #000 54%, rgba(0, 0, 0, 0.45) 78%, transparent 100%);
}
.face-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.48s ease, transform 0.65s ease;
  z-index: 2;
}
.face-img.active {
  opacity: 1;
  transform: scale(1);
  z-index: 3;
}
.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}
.brand-text span { color: var(--accent); }
.brand-now-title {
  font-size: 0.66rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 0.14rem;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search Palette */
.nav-search-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
  margin-left: auto;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(19, 24, 36, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.search-box:focus-within {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(255, 107, 43, 0.14);
}
.search-icon { color: var(--text-dim); flex-shrink: 0; }
.search-box input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 0.88rem;
  min-width: 0;
}
.search-kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.08rem 0.36rem;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.78);
  overflow: hidden;
  max-height: 460px;
  overflow-y: auto;
  z-index: 90;
}
.search-hist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.search-hist-clear {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}
.search-hist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.search-hist-item:hover { background: var(--bg-card); }
.search-hist-query {
  flex: 1;
  background: none;
  border: 0;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  padding: 0;
  font-size: 0.86rem;
}
.search-hist-rm {
  background: none;
  border: 0;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.25rem;
}
.search-hit {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.14s;
}
.search-hit:hover { background: var(--bg-card); }
.search-hit img {
  width: 44px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.search-hit-title { font-weight: 600; font-size: 0.88rem; line-height: 1.25; }
.search-hit-meta { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.25rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.search-all-link {
  display: block;
  text-align: center;
  padding: 0.72rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}
.search-all-link:hover { background: rgba(255, 107, 43, 0.24); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.top-pill-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: 0.16s;
}
.top-pill-link:hover { color: var(--text); border-color: var(--border-strong); }
.btn-top-surprise {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* Main Workspace Container */
.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.75rem 3.5rem;
}

/* Shared Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 1.3rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
  min-height: 40px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 107, 43, 0.25);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn-sm { padding: 0.4rem 0.92rem; font-size: 0.8rem; min-height: 34px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(14, 17, 26, 0.82);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }

/* Editorial Split Cinema Hero */
.hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: end;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  transition: opacity 0.38s ease;
}
.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 14, 0.96) 0%, rgba(8, 9, 14, 0.78) 48%, rgba(8, 9, 14, 0.32) 100%),
    linear-gradient(0deg, rgba(8, 9, 14, 0.96) 0%, rgba(8, 9, 14, 0.25) 55%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2.6rem;
  max-width: 680px;
}
.hero-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--gold);
  background: rgba(245, 185, 66, 0.12);
  border: 1px solid rgba(245, 185, 66, 0.3);
  padding: 0.26rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0 0 0.42rem;
}
.hero-jp { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.85rem; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.hero-meta span {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.hero-desc {
  color: #cdd5e3;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 1.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Spotlight Filmstrip Deck on Hero Right */
.hero-filmstrip {
  position: relative;
  z-index: 3;
  padding: 1.5rem 1.4rem 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-self: stretch;
  justify-content: flex-end;
}
.filmstrip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.filmstrip-arrows { display: flex; gap: 0.35rem; }
.filmstrip-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem;
  border-radius: 10px;
  background: rgba(14, 17, 26, 0.76);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: 0.16s;
}
.filmstrip-item:hover { background: rgba(24, 30, 46, 0.9); border-color: var(--border-strong); }
.filmstrip-item.active {
  background: rgba(255, 107, 43, 0.16);
  border-color: var(--accent);
}
.filmstrip-thumb {
  width: 38px;
  height: 52px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.filmstrip-meta { min-width: 0; flex: 1; }
.filmstrip-name {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filmstrip-sub { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Quick Genre Mood Strip */
.mood-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.75rem;
  margin-bottom: 0.75rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.mood-strip::-webkit-scrollbar { display: none; }
.mood-pill {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 0.44rem 0.95rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: 0.16s;
}
.mood-pill:hover, .mood-pill.accent {
  background: var(--accent-soft);
  color: var(--text);
  border-color: rgba(255, 107, 43, 0.42);
}

/* Section Headers */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.26rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
}
.tabs {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  padding: 0.24rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.tab-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}
.tab-btn.active { background: var(--accent); color: #fff; }

/* Home Layout & Edge-less Cinema Cards */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 2rem;
  align-items: start;
}
.home-layout > * { min-width: 0; }

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1.1rem;
}
.anime-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.18s ease;
}
.anime-card:hover { transform: translateY(-4px); }
.card-poster {
  position: relative;
  aspect-ratio: 2 / 2.88;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}
.anime-card:hover .card-poster { border-color: rgba(255, 107, 43, 0.45); }
.anime-card:hover .card-poster img { transform: scale(1.04); }
.card-hover-play {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(8, 9, 14, 0.58) 0%, rgba(8, 9, 14, 0.18) 100%);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.anime-card:hover .card-hover-play { opacity: 1; }
.play-orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.card-badges {
  position: absolute;
  left: 0.48rem;
  right: 0.48rem;
  bottom: 0.48rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  pointer-events: none;
}
.ep-pills { display: flex; gap: 0.24rem; flex-wrap: wrap; }
.ep-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  backdrop-filter: blur(8px);
}
.ep-pill.sub { background: rgba(14, 116, 144, 0.88); color: #e0f2fe; }
.ep-pill.dub { background: rgba(109, 40, 217, 0.88); color: #ede9fe; }
.ep-pill.total { background: rgba(15, 23, 42, 0.88); color: #cbd5e1; }
.type-pill {
  font-size: 0.64rem;
  font-weight: 700;
  background: rgba(8, 9, 14, 0.86);
  color: var(--text);
  padding: 0.15rem 0.42rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.score-badge {
  position: absolute;
  top: 0.48rem;
  left: 0.48rem;
  background: rgba(8, 9, 14, 0.84);
  backdrop-filter: blur(8px);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.16rem 0.44rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 185, 66, 0.25);
}
.card-body { display: flex; flex-direction: column; gap: 0.22rem; padding: 0 0.15rem; }
.card-title {
  font-weight: 700;
  font-size: 0.87rem;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-sub { font-size: 0.73rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Continue Watching */
.continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}
.continue-card {
  position: relative;
  display: flex;
  gap: 0.8rem;
  padding: 0.72rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: center;
  transition: border-color 0.16s, background 0.16s;
}
.continue-card:hover { border-color: var(--border-strong); background: var(--bg-elev); }
.continue-card img { width: 54px; height: 76px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.continue-info { flex: 1; min-width: 0; }
.continue-title { font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-ep { font-size: 0.76rem; color: var(--accent); margin: 0.24rem 0 0.45rem; font-weight: 600; }
.progress-track { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.continue-remove {
  position: absolute;
  top: 0.42rem;
  right: 0.42rem;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
}
.continue-remove:hover { color: var(--accent); }

/* Sidebar Leaderboard & Showcase */
.sidebar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.05rem;
}
.rank-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.85rem; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.48rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: 0.14s;
}
.rank-item:hover { background: var(--bg-card); border-color: var(--border); }
.rank-num {
  font-family: var(--font-mono);
  font-weight: 800;
  width: 26px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.rank-item.top-1 .rank-num { color: var(--gold); font-size: 1.15rem; }
.rank-item.top-2 .rank-num { color: #e2e8f0; font-size: 1.05rem; }
.rank-item.top-3 .rank-num { color: var(--accent); font-size: 1.05rem; }
.rank-item img { width: 44px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.rank-tx { flex: 1; min-width: 0; }
.rank-name { font-size: 0.84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta { display: flex; gap: 0.35rem; margin-top: 0.25rem; font-size: 0.72rem; color: var(--text-muted); align-items: center; }

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 2.1rem;
}
.showcase-col {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.showcase-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.25rem; }
.showcase-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.42rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: 0.14s;
}
.showcase-item:hover { background: var(--bg-card); border-color: var(--border); }
.showcase-item img { width: 44px; height: 62px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

/* Genres & Filters */
.genre-strip { display: flex; flex-wrap: wrap; gap: 0.42rem; margin-top: 0.75rem; }
.genre-chip {
  font-size: 0.76rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.14s;
}
.genre-chip:hover, .genre-chip.active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: rgba(255, 107, 43, 0.48);
}

.filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem;
  margin-bottom: 1.5rem;
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}
.field-group label { display: block; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.32rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.input-ctrl, .select-ctrl {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.5rem 0.72rem;
  font-size: 0.84rem;
  outline: none;
  min-height: 38px;
}
.input-ctrl:focus, .select-ctrl:focus { border-color: var(--accent); }
.az-bar { display: flex; gap: 0.32rem; overflow-x: auto; padding-bottom: 0.45rem; margin-bottom: 1rem; scrollbar-width: none; }
.az-bar::-webkit-scrollbar { display: none; }
.az-btn {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 0.34rem 0.62rem;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  cursor: pointer;
}
.az-btn.active, .az-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.42rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.page-btn.active { background: var(--accent); border-color: var(--accent); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Watch Cinema Stage */
.watch-shell { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.watch-crumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  background: rgba(14, 17, 26, 0.72);
  border: 1px solid var(--border);
  min-width: 0;
}
.crumb-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
}
.crumb-link { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.crumb-link:hover { color: var(--text); }
.crumb-sep { color: var(--text-dim); flex-shrink: 0; }
.crumb-title {
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb-ep-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 43, 0.35);
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: start;
}
.watch-grid.theater { grid-template-columns: minmax(0, 1fr); }
.player-column { position: relative; z-index: 45; min-width: 0; }

.player-stage {
  position: relative;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  aspect-ratio: 16 / 9;
  user-select: none;
  touch-action: manipulation;
}
.player-stage video { width: 100%; height: 100%; display: block; background: #000; }

.subtitle-overlay {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 5.5rem;
  z-index: 6;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: bottom 0.2s ease;
}
.player-stage.controls-hidden .subtitle-overlay { bottom: 1.4rem; }
.subtitle-line {
  display: inline-block;
  background: rgba(8, 9, 14, 0.84);
  color: #fff;
  padding: 0.22rem 0.75rem;
  border-radius: 6px;
  font-size: clamp(0.88rem, 1.8vw, 1.22rem);
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  max-width: 92%;
}

.touch-seek-badge {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(8, 9, 14, 0.86);
  border: 1px solid var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  pointer-events: none;
}
.touch-seek-badge.left { left: 14%; }
.touch-seek-badge.right { right: 14%; }

.player-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.9rem 1.15rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s;
}
.player-stage:hover .player-overlay-top,
.player-stage.paused .player-overlay-top { opacity: 1; }
.player-now-title { font-weight: 700; font-size: 0.9rem; text-shadow: 0 2px 8px #000; }

.player-spinner, .player-error-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 14, 0.78);
  z-index: 8;
  text-align: center;
  padding: 1.5rem;
}
.spinner-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  animation: spin 0.72s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skip-pill {
  position: absolute;
  right: 1.15rem;
  bottom: 5.4rem;
  z-index: 8;
  background: rgba(14, 17, 26, 0.94);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.skip-pill:hover { background: var(--accent); }

.upnext-banner {
  position: absolute;
  right: 1.15rem;
  bottom: 5.4rem;
  z-index: 9;
  background: rgba(14, 17, 26, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.65rem 1rem 0.7rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.62) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  z-index: 7;
  transition: opacity 0.22s;
}
.player-stage.controls-hidden .player-controls { opacity: 0; pointer-events: none; }
.player-stage.paused .player-controls { opacity: 1; pointer-events: auto; }

.seek-wrap { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; }
.seek-bar {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  transition: height 0.12s;
}
.seek-wrap:hover .seek-bar { height: 6px; }
.seek-buffer { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, 0.34); border-radius: 999px; }
.seek-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 999px;
}
.seek-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}
.seek-marker { position: absolute; top: 0; bottom: 0; background: rgba(245, 185, 66, 0.7); border-radius: 2px; }
.seek-thumb-preview {
  position: absolute;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px;
  pointer-events: none;
  text-align: center;
}
.seek-thumb-img { width: 160px; height: 90px; border-radius: 5px; background-repeat: no-repeat; margin-bottom: 3px; }
.seek-thumb-time { font-family: var(--font-mono); font-size: 0.72rem; color: #fff; }

.ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 0.38rem; flex-wrap: wrap; }
.ctrl-left, .ctrl-right { display: flex; align-items: center; gap: 0.28rem; min-width: 0; flex-wrap: wrap; }
.ctrl-right { margin-left: auto; justify-content: flex-end; }
.ctrl-btn {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0.36rem 0.48rem;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ctrl-btn:hover { background: rgba(255, 255, 255, 0.16); }
.vol-slider { width: 64px; accent-color: var(--accent); cursor: pointer; }
.time-readout { font-family: var(--font-mono); font-size: 0.74rem; color: #e2e8f0; white-space: nowrap; }

.ctrl-select {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  padding: 0.24rem 0.44rem;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ctrl-select option { background: #0e111a; color: #fff; }

/* Studio Action Deck & Source Switcher */
.player-bar {
  margin-top: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.player-toggles {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.toggle-group { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.34rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  min-height: 32px;
}
.chip-toggle.on { color: #fff; border-color: rgba(45, 212, 191, 0.5); background: rgba(45, 212, 191, 0.14); }

.server-groups { display: flex; flex-direction: column; gap: 0.55rem; }
.server-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; }
.server-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.56rem;
  border-radius: 999px;
  min-width: 52px;
  text-align: center;
}
.server-label.sub { background: rgba(56, 189, 248, 0.14); color: var(--sub); }
.server-label.dub { background: rgba(167, 139, 250, 0.14); color: var(--dub); }
.server-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 34px;
}
.server-btn:hover { color: #fff; border-color: var(--border-strong); }
.server-btn.active { background: var(--accent); color: #fff; border-color: transparent; }

/* Episodes Panel */
.episodes-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 620px;
  min-width: 0;
}
.ep-toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.ep-toolbar > * { min-width: 0; }
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.42rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}
.ep-list { display: flex; flex-direction: column; gap: 0.38rem; overflow-y: auto; padding-right: 0.2rem; }
.ep-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  min-height: 38px;
}
.ep-btn:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.ep-btn.active { background: var(--accent); border-color: transparent; color: #fff; }
.ep-btn.watched:not(.active) { opacity: 0.55; }
.ep-row-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  padding: 0.55rem 0.72rem;
  font-family: var(--font-sans);
}
.ep-row-num { font-family: var(--font-mono); color: var(--accent); font-weight: 800; min-width: 30px; }
.ep-row-title { flex: 1; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cinematic Detail Showcase */
.detail-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.55rem;
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  gap: 1.55rem;
}
.detail-backdrop-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(48px) saturate(1.25);
  opacity: 0.16;
  transform: scale(1.1);
  pointer-events: none;
}
.detail-card > *:not(.detail-backdrop-blur) { position: relative; z-index: 1; }
.detail-poster { border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); align-self: start; }
.detail-title { font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; margin: 0 0 0.28rem; letter-spacing: -0.02em; }
.detail-meta-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.65rem 0 0.95rem; }
.meta-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.55rem 1rem;
  margin-top: 1.05rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.spec-item span { color: var(--text-dim); margin-right: 0.35rem; }

.seasons-strip { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.35rem; scrollbar-width: none; }
.seasons-strip::-webkit-scrollbar { display: none; }
.season-pill {
  position: relative;
  min-width: 175px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.84rem;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.season-pill::before { content: ""; position: absolute; inset: 0; background: rgba(8, 9, 14, 0.72); }
.season-pill span { position: relative; z-index: 1; }
.season-pill.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Schedule */
.schedule-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 0.6rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
}
.day-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.78rem;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.day-tab:hover { border-color: var(--border-strong); }
.day-tab.active { background: var(--accent-soft); border-color: var(--accent); }
.day-tab-wd { font-family: var(--font-display); font-weight: 800; font-size: 0.96rem; }
.day-tab-date { font-size: 0.75rem; color: var(--text-muted); margin: 0.15rem 0; }
.day-tab-cnt { font-family: var(--font-mono); font-size: 0.72rem; color: var(--gold); font-weight: 700; }

.schedule-list { display: flex; flex-direction: column; gap: 0.75rem; }
.schedule-card {
  display: grid;
  grid-template-columns: 86px 64px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1.05rem;
}
.schedule-card:hover { border-color: var(--border-strong); background: var(--bg-elev); }
.schedule-time { font-family: var(--font-mono); font-weight: 800; color: var(--accent); font-size: 0.94rem; }
.schedule-card img { width: 64px; height: 90px; object-fit: cover; border-radius: 8px; }

/* Mobile Bottom Navigation Dock */
.mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  background: rgba(10, 12, 19, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.2rem;
}
.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.36rem 0.15rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.dock-btn.active {
  color: var(--accent);
  background: rgba(255, 107, 43, 0.1);
}

/* Overlays, Toast, Footer & Skeletons */
.lights-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92); z-index: 40; }
.toast-stack { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 120; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  color: var(--text);
  padding: 0.72rem 1rem;
  border-radius: 10px;
  font-size: 0.84rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
}

.footer { border-top: 1px solid var(--border); padding: 1.5rem 1.75rem; color: var(--text-dim); font-size: 0.8rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-brand { display: flex; flex-direction: column; gap: 0.25rem; }
.footer-brand strong { color: var(--text); font-family: var(--font-display); letter-spacing: 0.08em; }
.footer-brand strong span { color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

.skeleton {
  background: linear-gradient(90deg, #111520 25%, #1a2132 50%, #111520 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 14px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-box {
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 2.4rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

/* Utility classes for strict CSP style-src 'self' */
.mt-0 { margin-top: 0; }
.mb-sm { margin-bottom: 0.85rem; }
.mb-md { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 2rem; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.h1-page { font-size: 1.5rem; }
.h3-side { font-size: 1.05rem; }
.side-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.head-between { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.head-end { display: flex; gap: 0.65rem; justify-content: flex-end; }
.ep-panel-heading { font-family: var(--font-display); }
.continue-link { display: flex; gap: 0.8rem; flex: 1; min-width: 0; align-items: center; }
.status-select-sm { margin-top: 0.45rem; padding: 0.28rem 0.5rem; font-size: 0.75rem; }
.detail-jp { font-size: 0.88rem; }
.detail-synopsis { color: #cdd5e3; line-height: 1.64; margin: 0 0 0.9rem; }
.tag-sub { color: var(--sub); }
.tag-dub { color: var(--dub); }
.tag-gold { color: var(--gold); }
.sched-title { font-weight: 700; font-size: 0.96rem; }
.sched-meta { font-size: 0.78rem; margin: 0.2rem 0; }
.sched-syn { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 1rem; text-align: center; }
.skel-hero { height: 420px; margin-bottom: 1.8rem; }
.skel-card { aspect-ratio: 2 / 2.9; }
.skel-row { grid-column: 1 / -1; height: 260px; }
.skel-sched { height: 340px; }
.skel-sched-day { height: 260px; }
.skel-player { aspect-ratio: 16 / 9; max-height: 540px; }
.skel-detail { height: 220px; }
.empty-row-full { grid-column: 1 / -1; }
.player-err-title { font-weight: 700; margin-bottom: 0.4rem; }
.upnext-kicker { font-size: 0.74rem; }
.upnext-title { font-weight: 700; font-size: 0.88rem; }

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .watch-grid { grid-template-columns: minmax(0, 1fr); }
  .episodes-panel { max-height: 360px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-filmstrip {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 1.4rem 1.25rem;
    scrollbar-width: none;
  }
  .hero-filmstrip::-webkit-scrollbar { display: none; }
  .filmstrip-head { display: none; }
  .filmstrip-item { min-width: 175px; }
}

.mobile-only-inline { display: none; }

@media (max-width: 900px) {
  .mobile-only-inline { display: inline-flex; }
  .side-rail { display: none; }
  .workspace-col { margin-left: 0; padding-bottom: 70px; }
  .mobile-dock { display: grid; }
  .topbar-actions { display: none; }
  .topbar-inner { padding: 0.58rem 1rem; gap: 0.7rem; }
  .app-main { padding: 1rem 1rem 2rem; }
  .search-kbd { display: none; }
  .showcase-grid { grid-template-columns: minmax(0, 1fr); }
  .toast-stack { bottom: 4.8rem; right: 0.85rem; left: 0.85rem; }
}

@media (max-width: 720px) {
  .detail-card { grid-template-columns: minmax(0, 1fr); padding: 1.1rem; gap: 1rem; }
  .detail-poster { max-width: 150px; }
  .schedule-card { grid-template-columns: 70px 56px minmax(0, 1fr); }
  .schedule-card .btn { display: none; }
  .hero { min-height: 330px; border-radius: 14px; }
  .hero-content { padding: 1.35rem 1.2rem; }
  .hero-desc { -webkit-line-clamp: 2; font-size: 0.86rem; }
  [data-role="theater"] { display: none; }
}

@media (max-width: 640px) {
  .face-reel { width: 36px; height: 36px; }
  .brand-text { font-size: 0.96rem; }
  .brand-now-title { display: none; }
  .anime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.78rem; }
  .continue-grid { grid-template-columns: minmax(0, 1fr); }
  .app-main { padding: 0.85rem 0.75rem 2rem; }
  .player-stage { border-radius: 12px; }
  .player-overlay-top { padding: 0.55rem 0.75rem; }
  .player-now-title { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .player-controls { padding: 0.9rem 0.55rem 0.45rem; gap: 0.3rem; }
  .seek-wrap { height: 14px; }
  .subtitle-overlay { bottom: 4.6rem; }
  .skip-pill, .upnext-banner { bottom: 4.4rem; right: 0.6rem; max-width: calc(100% - 1.2rem); }
  [data-role="rewind"],
  [data-role="forward"],
  .vol-slider { display: none; }
  .ctrl-row { gap: 0.25rem; }
  .ctrl-left, .ctrl-right { gap: 0.22rem; }
  .ctrl-btn { padding: 0.28rem 0.34rem; min-width: 32px; min-height: 30px; }
  .time-readout { font-size: 0.68rem; }
  .ctrl-select { max-width: 58px; font-size: 0.67rem; padding: 0.16rem 0.24rem; }
  [data-role="fullscreen"] {
    background: rgba(255, 107, 43, 0.24);
    border: 1px solid rgba(255, 107, 43, 0.55);
    border-radius: 6px;
    padding: 0.26rem 0.42rem;
  }
  .player-bar { padding: 0.75rem; border-radius: 12px; }
  .player-bar .toggle-group { width: 100%; }
  .player-bar .btn-sm, .player-bar .chip-toggle { font-size: 0.74rem; padding: 0.32rem 0.64rem; min-height: 32px; }
  .ep-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
}

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

/* Turnstile verification overlay (shown only when Cloudflare requests interactive challenge) */
.turnstile-gate {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 7, 12, 0.88);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.turnstile-gate.hidden {
  display: none;
}
.ts-gate-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 43, 0.16), rgba(92, 128, 255, 0.08) 48%, transparent 72%);
  filter: blur(24px);
  pointer-events: none;
}
.ts-gate-card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  background: linear-gradient(180deg, rgba(22, 26, 40, 0.94), rgba(14, 17, 26, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.7rem 1.45rem;
  text-align: center;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.72), 0 0 42px rgba(255, 107, 43, 0.09);
}
.ts-gate-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245, 185, 66, 0.12);
  border: 1px solid rgba(245, 185, 66, 0.25);
  border-radius: 999px;
  padding: 0.22rem 0.68rem;
  margin-bottom: 0.6rem;
}
.ts-gate-brand {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text);
  margin-bottom: 0.45rem;
}
.ts-gate-brand span {
  color: var(--accent);
}
.ts-gate-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.ts-gate-desc {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin: 0 0 1.05rem;
}
.ts-widget-host {
  position: relative;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}
.ts-widget-host:empty::before {
  content: "Initializing Turnstile challenge...";
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}
