/* ==========================================================================
   NONTONGO — PHP theme extensions
   Navigation mega menu, hero slider, filters, pagination, title/watch pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header: navigation mega menu
   -------------------------------------------------------------------------- */

.nav-menu {
  position: relative;
}

.nav-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  list-style: none;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.nav-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-menu > summary svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  transition: transform 0.3s var(--ease);
}

.nav-menu > summary:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-menu.is-active > summary {
  color: #dffbff;
  border-color: rgba(34, 230, 255, 0.24);
  background: rgba(34, 230, 255, 0.06);
}

.nav-menu[open] > summary {
  color: #dffbff;
  border-color: rgba(34, 230, 255, 0.24);
  background: rgba(34, 230, 255, 0.06);
}

.nav-menu[open] > summary svg {
  transform: rotate(180deg);
}

.nav-panel {
  position: fixed;
  top: calc(var(--header-h) + 10px);
  left: 50%;
  z-index: 120;
  width: min(800px, calc(100vw - 40px));
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(34, 230, 255, 0.09), transparent 70%),
    radial-gradient(500px 220px at 90% 100%, rgba(255, 62, 165, 0.07), transparent 70%),
    rgba(6, 12, 22, 0.97);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(34, 230, 255, 0.05) inset;
  transform: translate(-50%, -8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0.25s;
}

.nav-menu[open] .nav-panel {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.nav-panel::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: rgba(6, 12, 22, 0.97);
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  transform: translateX(-50%) rotate(45deg);
  display: none;
}

.nav-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.nav-panel-top .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.nav-panel-lede {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.nav-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #cfe8ff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.nav-all svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.nav-all:hover {
  border-color: rgba(34, 230, 255, 0.4);
  background: rgba(34, 230, 255, 0.07);
}

.nav-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.nav-col {
  min-width: 0;
}

.nav-col h4 {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.nav-col ul {
  display: grid;
  gap: 2px;
}

.nav-col a {
  display: block;
  padding: 6px 8px;
  border-radius: 7px;
  color: #b9c8e2;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-col a:hover {
  color: #eaf9ff;
  background: rgba(34, 230, 255, 0.07);
}

.nav-more {
  display: inline-block;
  margin-top: 8px;
  color: var(--cyan) !important;
  font-family: var(--font-mono);
  font-size: 0.58rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-col-highlight {
  padding: 14px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.07);
}

/* --------------------------------------------------------------------------
   Hero slider
   -------------------------------------------------------------------------- */

.hero-slider {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: min(860px, 92vh);
  padding-top: var(--header-h);
  isolation: isolate;
}

.hero-slides {
  position: relative;
  flex: 1;
  min-height: clamp(560px, 72vh, 820px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-position: center 24%;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.06);
  filter: saturate(0.92) contrast(1.02);
  transition: transform 8s linear;
}

.hero-slide.is-active .hero-media {
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 7, 15, 0.97) 0%, rgba(4, 7, 15, 0.82) 34%, rgba(4, 7, 15, 0.2) 68%, rgba(4, 7, 15, 0.55) 100%),
    linear-gradient(0deg, var(--bg) 2%, rgba(4, 7, 15, 0.55) 22%, transparent 55%),
    linear-gradient(180deg, rgba(4, 7, 15, 0.65), transparent 18%);
}

.hero-slide-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: clamp(96px, 13vh, 150px);
}

.hero-slide-copy {
  max-width: 680px;
}

.hero-slide-copy > * {
  animation: heroRise 0.8s var(--ease) both;
}

.hero-slide.is-active .hero-slide-copy > *:nth-child(1) { animation-delay: 0.06s; }
.hero-slide.is-active .hero-slide-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-slide.is-active .hero-slide-copy > *:nth-child(3) { animation-delay: 0.22s; }
.hero-slide.is-active .hero-slide-copy > *:nth-child(4) { animation-delay: 0.3s; }
.hero-slide.is-active .hero-slide-copy > *:nth-child(5) { animation-delay: 0.38s; }
.hero-slide.is-active .hero-slide-copy > *:nth-child(6) { animation-delay: 0.46s; }
.hero-slide.is-active .hero-slide-copy > *:nth-child(7) { animation-delay: 0.54s; }

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-slide-copy h1 {
  margin-top: 16px;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #f4f9ff;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
}

.hero-lede {
  margin-top: 18px;
  max-width: 56ch;
  color: #b9c8e2;
  font-size: 0.92rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions .btn {
  height: 52px;
}

.hero-servers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.hero-servers-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 2px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero-servers-label svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.server-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 230, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 16, 28, 0.6);
  backdrop-filter: blur(10px);
  color: #cfeeff;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.server-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(53, 242, 163, 0.9);
}

.server-chip:hover {
  border-color: rgba(34, 230, 255, 0.5);
  background: rgba(34, 230, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(34, 230, 255, 0.14);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: calc(100% - 48px);
  max-width: var(--container);
  transform: translateX(-50%);
}

.hero-counter {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.hero-counter strong {
  font-size: 1rem;
  font-weight: 600;
  color: #e8f7ff;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-dot {
  width: 22px;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  transition: width 0.4s var(--ease), background 0.3s ease, box-shadow 0.3s ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
  width: 44px;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(34, 230, 255, 0.5);
}

.hero-arrows {
  display: flex;
  gap: 8px;
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(5, 11, 21, 0.55);
  backdrop-filter: blur(10px);
  color: #cfe4ff;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.3s var(--ease);
}

.hero-arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-arrow:hover {
  border-color: rgba(34, 230, 255, 0.55);
  background: rgba(34, 230, 255, 0.12);
  transform: translateY(-2px);
}

.hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.hero-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(34, 230, 255, 0.55);
  transition: width 0.25s linear;
}

.hero-fallback {
  position: relative;
  padding-top: calc(var(--header-h) + 96px);
  padding-bottom: 80px;
  overflow: hidden;
}

.hero-fallback h1 {
  margin-top: 18px;
  max-width: 20ch;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.hero-fallback .lede {
  margin-top: 16px;
  max-width: 56ch;
  color: var(--muted);
}

.hero-fallback .hero-search {
  margin-top: 28px;
  max-width: 620px;
}

.home-notices {
  display: grid;
  gap: 8px;
  padding-top: 22px;
}

/* --------------------------------------------------------------------------
   Explore band
   -------------------------------------------------------------------------- */

.explore-band {
  position: relative;
  display: grid;
  gap: 20px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(700px 220px at 2% 0%, rgba(34, 230, 255, 0.08), transparent 65%),
    radial-gradient(600px 260px at 98% 100%, rgba(139, 92, 246, 0.1), transparent 65%),
    rgba(8, 14, 26, 0.6);
  overflow: hidden;
}

.explore-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: exploreSweep 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes exploreSweep {
  0%, 55% { transform: translateX(-100%); }
  75%, 100% { transform: translateX(100%); }
}

.explore-head h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.explore-head h2 em {
  font-style: normal;
  background: var(--grad-text);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.explore-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.explore-group {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.explore-label {
  width: 100%;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.explore-all {
  justify-self: start;
}

/* --------------------------------------------------------------------------
   Browse filters
   -------------------------------------------------------------------------- */

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(9, 16, 28, 0.62);
  backdrop-filter: blur(14px);
}

.filter-field {
  display: flex;
  flex: 1 1 160px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.filter-field > span {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.select-wrap select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 0.8rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.select-wrap select:hover,
.select-wrap select:focus {
  border-color: rgba(34, 230, 255, 0.4);
  background: rgba(34, 230, 255, 0.05);
  outline: none;
}

.select-wrap select option {
  background: #0a1322;
  color: var(--text);
}

.select-wrap svg {
  position: absolute;
  right: 11px;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 1px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.active-filter {
  padding: 5px 10px;
  border: 1px solid rgba(34, 230, 255, 0.22);
  border-radius: 999px;
  background: rgba(34, 230, 255, 0.07);
  color: #bfeeff;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 34px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.3s var(--ease);
}

.page-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-link:hover {
  border-color: rgba(34, 230, 255, 0.4);
  background: rgba(34, 230, 255, 0.07);
  color: #e8f9ff;
  transform: translateY(-1px);
}

.page-link.is-active {
  border-color: transparent;
  background: var(--grad);
  color: #041018;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(34, 230, 255, 0.24);
}

.page-gap {
  padding: 0 4px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* --------------------------------------------------------------------------
   Title page additions
   -------------------------------------------------------------------------- */

.detail-servers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.detail-servers > span {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.season-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.season-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  font-size: 0.76rem;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.3s var(--ease);
}

.season-chip small {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.season-chip:hover {
  border-color: rgba(34, 230, 255, 0.36);
  background: rgba(34, 230, 255, 0.06);
  color: #dff9ff;
  transform: translateY(-1px);
}

.season-chip.is-active {
  border-color: rgba(34, 230, 255, 0.55);
  background: rgba(34, 230, 255, 0.12);
  color: #ecfdff;
  box-shadow: 0 0 22px rgba(34, 230, 255, 0.12);
}

.season-chip.is-active small {
  color: #9fe9ff;
}

.ep-thumb-anime {
  position: relative;
}

.ep-thumb-anime::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(34, 230, 255, 0.07) 0 2px, transparent 2px 14px),
    radial-gradient(80% 120% at 50% 120%, rgba(139, 92, 246, 0.28), transparent 70%);
}

.ep-thumb-anime .ep-number {
  border-color: rgba(34, 230, 255, 0.3);
}

.ep-thumb-anime .ep-play {
  opacity: 0.35;
  transform: translate(-50%, -50%) scale(0.9);
}

.episode-card:hover .ep-thumb-anime .ep-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.search-suggest {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  border: 1px dashed rgba(34, 230, 255, 0.24);
  border-radius: 20px;
  background: rgba(8, 15, 27, 0.5);
}

.search-suggest h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-search {
  margin-top: 26px;
  max-width: 620px;
}

/* --------------------------------------------------------------------------
   Watch page
   -------------------------------------------------------------------------- */

.watch-hero {
  position: relative;
  padding-top: calc(var(--header-h) + 54px);
  padding-bottom: 38px;
  overflow: hidden;
  isolation: isolate;
}

.watch-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--backdrop);
  background-position: center 22%;
  background-size: cover;
  opacity: 0.24;
  filter: saturate(1.05) blur(1px);
  transform: scale(1.04);
}

.watch-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 7, 15, 0.94) 0%, rgba(4, 7, 15, 0.72) 45%, rgba(4, 7, 15, 0.4) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 55%),
    linear-gradient(180deg, rgba(4, 7, 15, 0.55), transparent 30%);
}

.watch-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfe8ff;
}

.watch-kicker .sep {
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.watch-kicker .kicker-muted {
  color: var(--dim);
  letter-spacing: 0.1em;
}

.watch-hero h1 {
  margin-top: 10px;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-shadow: 0 14px 50px rgba(0, 0, 0, 0.5);
}

.watch-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
}

.watch-section {
  padding-top: 26px;
  padding-bottom: 20px;
}

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

.watch-main {
  min-width: 0;
}

.watch-player {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    radial-gradient(600px 200px at 12% 0%, rgba(34, 230, 255, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(12, 22, 38, 0.86), rgba(5, 9, 17, 0.92));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.watch-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(34, 230, 255, 0.14);
  border-radius: 17px;
  background: #03060c;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(34, 230, 255, 0.07) inset;
}

.watch-frame iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #03060c;
}

.watch-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(34, 230, 255, 0.08), transparent 70%),
    #04070f;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.watch-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.watch-loader p {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.watch-no-embed {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.watch-no-embed svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--red);
  stroke-width: 1.6;
}

.watch-player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 6px 2px;
}

.watch-now {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.watch-now > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.watch-now span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.watch-now strong {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 500;
  color: #e4f2ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(53, 242, 163, 0.12), 0 0 14px rgba(53, 242, 163, 0.8);
  animation: livePulse 2.2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(53, 242, 163, 0.12), 0 0 14px rgba(53, 242, 163, 0.8); }
  50% { box-shadow: 0 0 0 7px rgba(53, 242, 163, 0.05), 0 0 22px rgba(53, 242, 163, 0.95); }
}

.watch-player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.watch-player-actions .pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.watch-player-actions .pill-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-embed-url {
  margin: 10px 6px 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.watch-embed-url summary {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  cursor: pointer;
  list-style: none;
}

.watch-embed-url summary::-webkit-details-marker {
  display: none;
}

.watch-embed-url summary::before {
  content: '+';
  display: inline-block;
  width: 14px;
  color: var(--cyan);
}

.watch-embed-url[open] summary::before {
  content: '–';
}

.watch-embed-url code {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: #9fd8ff;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.watch-sources {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(139, 92, 246, 0.08), transparent 70%),
    rgba(8, 15, 27, 0.62);
}

.watch-sources-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.watch-sources-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.watch-sources-head h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.source-hint {
  max-width: 34ch;
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: right;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.source-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--text);
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.32s var(--ease), box-shadow 0.3s ease;
}

.source-btn:hover {
  border-color: rgba(34, 230, 255, 0.34);
  background: rgba(34, 230, 255, 0.06);
  transform: translateY(-2px);
}

.source-btn.is-active {
  border-color: rgba(34, 230, 255, 0.55);
  background:
    linear-gradient(120deg, rgba(34, 230, 255, 0.14), rgba(139, 92, 246, 0.1)),
    rgba(8, 18, 32, 0.8);
  box-shadow: 0 0 0 1px rgba(34, 230, 255, 0.12), 0 14px 36px rgba(0, 0, 0, 0.4), 0 0 26px rgba(34, 230, 255, 0.1);
}

.source-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(34, 230, 255, 0.24);
  border-radius: 11px;
  background: rgba(34, 230, 255, 0.07);
  color: var(--cyan);
}

.source-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}


.source-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.source-copy strong {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #e8f4ff;
}

.source-copy span {
  margin-top: 2px;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-state {
  flex: none;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-btn.is-active .source-state {
  border-color: rgba(34, 230, 255, 0.4);
  background: rgba(34, 230, 255, 0.12);
  color: #b9f3ff;
}

.source-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.55;
}

.source-note svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.7;
}

.watch-episodes {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(8, 15, 27, 0.58);
}

.watch-episodes .episodes-head {
  padding-bottom: 14px;
}

.episode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.ep-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition: border-color 0.22s ease, background 0.22s ease, color 0.22s ease, transform 0.3s var(--ease);
}

.ep-pill > span {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: #dbe9fb;
}

.ep-pill small {
  min-width: 0;
  font-size: 0.64rem;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-pill:hover {
  border-color: rgba(34, 230, 255, 0.36);
  background: rgba(34, 230, 255, 0.07);
  transform: translateY(-1px);
}

.ep-pill.is-active {
  border-color: rgba(34, 230, 255, 0.6);
  background: linear-gradient(120deg, rgba(34, 230, 255, 0.2), rgba(139, 92, 246, 0.16));
  color: #ecfdff;
  box-shadow: 0 0 20px rgba(34, 230, 255, 0.14);
}

.ep-pill.is-active > span {
  color: #ffffff;
}

.ep-pill.is-active small {
  color: #b6efff;
}

.ep-strip-compact {
  max-height: none;
}

.ep-strip-compact .ep-pill {
  justify-content: center;
  min-width: 52px;
  padding: 9px 10px;
}

.watch-side {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 14px;
  min-width: 0;
}

.watch-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(12, 21, 36, 0.72), rgba(5, 9, 17, 0.8));
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.watch-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(34, 230, 255, 0.14), transparent 70%),
    #060c16;
}

.watch-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transition: transform 0.6s var(--ease);
}

.watch-poster:hover img {
  transform: scale(1.04);
}

.watch-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 9, 17, 0.9), transparent 60%);
}

.watch-poster .poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.watch-poster .poster-fallback span {
  font-family: var(--font-display);
  font-size: 3rem;
  color: rgba(139, 184, 255, 0.35);
}

.watch-poster-glow {
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 230, 255, 0.18), transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.watch-card-body {
  padding: 18px 20px 20px;
}

.watch-card-body .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.watch-card-body h2 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.watch-card-meta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.watch-card-overview {
  margin-top: 12px;
  color: #a9b9d4;
  font-size: 0.79rem;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.watch-side .facts {
  gap: 12px 20px;
  margin-top: 16px;
  padding-top: 14px;
}

.watch-side .fact dd {
  font-size: 0.74rem;
}

.watch-card-link {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

.watch-next {
  padding: 16px 18px;
  border: 1px dashed rgba(34, 230, 255, 0.22);
  border-radius: 18px;
  background: rgba(8, 15, 27, 0.5);
}

.watch-next .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.watch-next strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2f1ff;
}

.watch-next span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

/* --------------------------------------------------------------------------
   Firefox scrollbars
   -------------------------------------------------------------------------- */

@supports (-moz-appearance: none) {
  html {
    scrollbar-width: thin;
    scrollbar-color: #243a55 #050a13;
  }

  .episode-strip,
  .main-nav,
  .nav-col ul {
    scrollbar-width: thin;
    scrollbar-color: rgba(93, 175, 230, 0.4) rgba(255, 255, 255, 0.04);
  }
}

/* --------------------------------------------------------------------------
   Footer: five columns
   -------------------------------------------------------------------------- */

.site-footer .footer-grid {
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .hero-slide-copy {
    max-width: 600px;
  }

  .watch-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 1080px) {
  .watch-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .watch-side {
    position: static;
    grid-template-columns: minmax(0, 1fr);
  }

  .watch-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: stretch;
  }

  .watch-poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 220px;
  }

  .watch-card-body {
    padding: 22px;
  }
}

@media (max-width: 980px) {
  .nav-menu {
    display: block;
  }

  .nav-menu > summary {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 0.94rem;
  }

  .nav-menu > summary svg {
    margin-left: auto;
  }

  .main-nav {
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-menu .nav-panel,
  .nav-menu[open] .nav-panel {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    margin: 6px 0 4px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }

  .nav-menu:not([open]) .nav-panel {
    display: none;
  }

  .nav-panel::before {
    display: none;
  }

  .nav-panel-top {
    padding-bottom: 12px;
  }

  .nav-panel-lede {
    display: none;
  }

  .nav-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .nav-col ul {
    max-height: 210px;
    overflow-y: auto;
  }

  .nav-col-highlight {
    grid-column: 1 / -1;
  }

  .hero-slider {
    min-height: 0;
  }

  .hero-slides {
    min-height: clamp(520px, 76vh, 700px);
  }

  .hero-slide-inner {
    padding-bottom: 104px;
  }

  .explore-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer .footer-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .hero-slide-copy {
    max-width: 100%;
  }

  .hero-slide-copy h1 {
    font-size: clamp(2.1rem, 8vw, 3rem);
  }

  .hero-lede {
    -webkit-line-clamp: 2;
    font-size: 0.85rem;
  }

  .hero-actions .btn {
    height: 46px;
  }

  .watch-card {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .watch-card-body {
    padding: 18px;
  }

  .source-hint {
    text-align: left;
  }

  .watch-sources,
  .watch-episodes {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  .hero-slider {
    min-height: 0;
  }

  .hero-slides {
    min-height: 560px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, var(--bg) 4%, rgba(4, 7, 15, 0.82) 34%, rgba(4, 7, 15, 0.35) 70%, rgba(4, 7, 15, 0.6) 100%),
      linear-gradient(90deg, rgba(4, 7, 15, 0.8), rgba(4, 7, 15, 0.2));
  }

  .hero-slide-inner {
    padding-bottom: 118px;
  }

  .hero-lede {
    display: none;
  }

  .hero-genres {
    display: none;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero-servers {
    margin-top: 16px;
  }

  .hero-servers-label {
    width: 100%;
  }

  .hero-controls {
    bottom: 18px;
  }

  .hero-counter {
    display: none;
  }

  .hero-dots {
    flex: 1;
  }

  .hero-dot {
    flex: 1;
    max-width: 44px;
  }

  .explore-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-form {
    padding: 14px;
  }

  .filter-field {
    flex: 1 1 calc(50% - 12px);
  }

  .filter-actions {
    flex: 1 1 100%;
  }

  .filter-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .watch-hero {
    padding-top: calc(var(--header-h) + 34px);
  }

  .watch-hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.3rem);
  }

  .watch-player {
    padding: 8px;
    border-radius: 20px;
  }

  .watch-frame {
    border-radius: 13px;
  }

  .watch-player-bar {
    padding: 12px 4px 2px;
  }

  .watch-player-actions {
    width: 100%;
  }

  .watch-player-actions .pill-btn {
    flex: 1;
    justify-content: center;
  }

  .watch-card {
    display: block;
  }

  .watch-poster {
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .source-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .source-state {
    display: none;
  }

  .ep-pill {
    max-width: 100%;
  }

  .season-chip {
    flex: 1 1 auto;
    justify-content: center;
  }

  .pagination .page-link span {
    display: none;
  }

  .site-footer .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer .footer-brand,
  .site-footer .footer-status {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .nav-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-col ul {
    max-height: 180px;
  }

  .filter-field {
    flex: 1 1 100%;
  }

  .watch-meta .meta-chip {
    font-size: 0.58rem;
  }

  .ep-pill small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-media,
  .hero-slide-copy > *,
  .explore-band::before {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
