:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --text: #19202a;
  --muted: #697386;
  --line: #dfe4ea;
  --brand: #0c7a72;
  --brand-strong: #075f59;
  --accent: #c94f32;
  --shadow: 0 12px 30px rgba(24, 32, 42, .08);
  --topbar-bg: rgba(255,255,255,.92);
  --input-bg: #fff;
  --hover-bg: #e7f2f0;
  --button-soft: #e9edf2;
  --episode-bg: #eef2f5;
  --child-row-bg: #edf1f5;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1318;
  --panel: #171d24;
  --panel-soft: #1d2530;
  --text: #edf2f7;
  --muted: #a4afbd;
  --line: #2b3541;
  --brand: #12a89b;
  --brand-strong: #4fd6cb;
  --accent: #d46345;
  --shadow: 0 14px 36px rgba(0, 0, 0, .28);
  --topbar-bg: rgba(15, 19, 24, .94);
  --input-bg: #111720;
  --hover-bg: #172c2c;
  --button-soft: #252f3b;
  --episode-bg: #202936;
  --child-row-bg: #202a36;
}

* { box-sizing: border-box; }
html,
body,
.topbar,
.card,
.panel,
.submenu,
.site-footer,
input,
select,
textarea,
button,
.btn {
  transition:
    background-color .32s ease,
    background .32s ease,
    color .32s ease,
    border-color .32s ease,
    box-shadow .32s ease;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wrap { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.logo { flex: 0 0 auto; font-weight: 800; font-size: 20px; color: var(--brand-strong); }
.logo img { max-height: 38px; width: auto; }
.navlinks {
  order: 10;
  flex: 1 0 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
  padding-bottom: 2px;
}
.navitem { position: relative; display: inline-flex; }
.navitem:hover,
.navitem.open {
  z-index: 130;
}
.navlinks a, .nav-parent, .pill {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}
.nav-parent {
  min-height: auto;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.nav-parent::after { content: " ▾"; color: var(--muted); }
.navlinks a:hover, .nav-parent:hover, .navitem.open .nav-parent, .pill.active { background: var(--hover-bg); color: var(--brand-strong); }
.submenu {
  display: none;
  position: absolute;
  z-index: 140;
  top: 38px;
  left: 0;
  min-width: 136px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.navitem:hover .submenu, .navitem.open .submenu { display: grid; gap: 4px; }
.submenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.nav-count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--button-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.library-links {
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  white-space: nowrap;
}
.library-links a {
  padding: 6px 7px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}
.library-links a:hover { background: var(--hover-bg); color: var(--brand-strong); }
.search { display: flex; gap: 8px; align-items: center; }
.search input { width: 180px; }
.search-tools { position: relative; display: flex; flex: 0 0 auto; gap: 8px; align-items: center; }
.advanced-search { position: relative; }
.advanced-search summary { list-style: none; cursor: pointer; white-space: nowrap; padding: 10px 12px; border-radius: 8px; background: var(--button-soft); color: var(--brand-strong); font-weight: 700; }
.advanced-search summary::-webkit-details-marker { display: none; }
.advanced-search[open] summary { background: var(--brand); color: #fff; }
.advanced-search-panel { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: 290px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.advanced-search-panel strong { display: block; margin-bottom: 12px; }
.advanced-search-panel label { display: grid; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.advanced-search-panel input, .advanced-search-panel select { width: 100%; }
.advanced-search-panel button { width: 100%; }
.advanced-recommended-searches {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.advanced-recommended-searches span {
  display: block;
  margin-bottom: 8px;
}
.advanced-recommended-searches div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.advanced-recommended-searches a {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--episode-bg);
  color: var(--text);
}
.advanced-recommended-searches a:hover {
  background: var(--hover-bg);
  color: var(--brand-strong);
}
.search-btn {
  width: 40px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}
.theme-toggle {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d097, #91ead0);
  box-shadow: 0 10px 24px rgba(18, 168, 155, .28);
}
.theme-toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, #14222a, #304151);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 214, 90, .18);
}
.theme-toggle-label {
  color: #16221f;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .24);
}
.theme-toggle[aria-pressed="true"] .theme-toggle-label {
  color: #e8c85e;
  text-shadow: 0 0 10px rgba(232, 200, 94, .24);
}
.lightbulb-icon {
  position: relative;
  width: 19px;
  height: 24px;
  margin-top: -1px;
  border-radius: 50% 50% 38% 38%;
  background: #ffd614;
  box-shadow:
    0 -16px 0 -7px #ffd614,
    0 17px 0 -7px #2c2c2c,
    -14px -10px 0 -8px #ffd614,
    14px -10px 0 -8px #ffd614,
    -19px 1px 0 -9px #ffd614,
    19px 1px 0 -9px #ffd614,
    -13px 12px 0 -9px #ffd614,
    13px 12px 0 -9px #ffd614,
    0 0 14px rgba(255, 214, 20, .72);
  transition: transform .32s ease, filter .32s ease, box-shadow .32s ease, opacity .32s ease;
}
.lightbulb-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 18px;
  height: 11px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: repeating-linear-gradient(
    to bottom,
    #333 0 3px,
    transparent 3px 5px
  );
}
.lightbulb-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 12px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 0 0 999px 999px;
  background: #333;
}
.theme-toggle[aria-pressed="true"] .lightbulb-icon {
  transform: scale(.88);
  filter: saturate(.65) brightness(.78);
  box-shadow:
    0 -16px 0 -7px rgba(255, 214, 20, .34),
    0 17px 0 -7px #1e242b,
    -14px -10px 0 -8px rgba(255, 214, 20, .28),
    14px -10px 0 -8px rgba(255, 214, 20, .28),
    -19px 1px 0 -9px rgba(255, 214, 20, .22),
    19px 1px 0 -9px rgba(255, 214, 20, .22),
    -13px 12px 0 -9px rgba(255, 214, 20, .18),
    13px 12px 0 -9px rgba(255, 214, 20, .18),
    0 0 4px rgba(255, 214, 20, .2);
}
.site-notice-trigger {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d097, #91ead0);
  box-shadow: 0 10px 24px rgba(18, 168, 155, .28);
}
.notice-face {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eafff8;
}
.notice-face::before,
.notice-face::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #159b82;
}
.notice-face::before { left: 6px; }
.notice-face::after { right: 6px; }
.notice-face {
  box-shadow: inset 0 -7px 0 rgba(21, 155, 130, .14);
}
.site-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(13px);
}
.site-notice-overlay[hidden] {
  display: none;
}
body.notice-open {
  overflow: hidden;
}
.site-notice-card {
  width: min(520px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 28px;
  background: #15151b;
  color: #f5f7f7;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .48);
}
.site-notice-head {
  position: relative;
  min-height: 118px;
  display: grid;
  grid-template-columns: 58px 1fr 42px;
  gap: 18px;
  align-items: center;
  padding: 22px 22px 20px;
  background: linear-gradient(135deg, rgba(65, 205, 158, .22), rgba(27, 54, 57, .86));
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}
.site-notice-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.36;
  text-align: center;
  letter-spacing: 0;
}
.site-notice-close {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(230, 255, 246, .62);
  font-size: 42px;
  line-height: 1;
}
.notice-bell {
  position: relative;
  width: 36px;
  height: 42px;
  border-radius: 18px 18px 8px 8px;
  background: #00d19a;
  box-shadow: -15px 20px 0 -12px rgba(0, 209, 154, .38), 17px 10px 0 -10px rgba(0, 209, 154, .38);
}
.notice-bell::before,
.notice-bell::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #00d19a;
}
.notice-bell::before {
  top: -8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.notice-bell::after {
  bottom: -7px;
  width: 14px;
  height: 8px;
  border-radius: 0 0 10px 10px;
}
.site-notice-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  padding: 26px 24px 28px;
}
.site-notice-copy h3 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 0;
}
.site-notice-copy p,
.notice-muted {
  margin: 12px 0 0;
  color: rgba(245, 247, 247, .72);
  line-height: 1.45;
}
.site-notice-copy strong {
  display: block;
  margin-top: 10px;
  color: rgba(245, 247, 247, .62);
  font-size: 20px;
}
.notice-domain {
  display: inline-block;
  margin-top: 6px;
  color: #42d99f;
  font-size: 22px;
  font-weight: 800;
  text-decoration: underline;
}
.notice-qr-wrap {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  padding-top: 8px;
  color: #f5f7f7;
  text-align: center;
}
.notice-qr {
  width: 146px;
  aspect-ratio: 1;
  border: 6px solid #eee;
  border-radius: 7px;
  background:
    linear-gradient(90deg, #000 10px, transparent 10px 18px, #000 18px 26px, transparent 26px 36px, #000 36px 44px, transparent 44px),
    linear-gradient(#000 10px, transparent 10px 18px, #000 18px 26px, transparent 26px 36px, #000 36px 44px, transparent 44px),
    repeating-linear-gradient(45deg, #000 0 7px, #fff 7px 13px);
  background-color: #fff;
  background-size: 54px 54px, 54px 54px, 18px 18px;
}
.notice-download {
  grid-column: 1 / -1;
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border-radius: 999px;
  background: #45cf98;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
}
.notice-muted {
  grid-column: 1 / -1;
  margin-top: 0;
}
.notice-save {
  grid-column: 1 / -1;
  min-height: 58px;
  margin-top: 8px;
  border: 3px solid #45cf98;
  border-radius: 999px;
  background: transparent;
  color: #45cf98;
  font-size: 20px;
  font-weight: 800;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--input-bg);
  color: var(--text);
}
button, .btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}
.btn.secondary, button.secondary { background: var(--button-soft); color: var(--text); }
.btn.warn, button.warn { background: var(--accent); }
.hero {
  padding: 30px 0 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 46px); letter-spacing: 0; }
.hero p { margin: 0; color: var(--muted); }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
.breadcrumb a {
  color: var(--brand-strong);
}
.video-filters {
  display: inline-flex;
  margin: 0 0 12px;
}
.video-filters label {
  display: block;
}
.video-filters select {
  width: auto;
  min-width: 88px;
  padding: 7px 28px 7px 10px;
  font-size: 14px;
}
.recommended-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.recommended-searches a {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--episode-bg);
  color: var(--text);
}
.recommended-searches a:hover {
  background: var(--hover-bg);
  color: var(--brand-strong);
}
.video-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.video-actions button.active,
.video-actions .active { background: var(--brand); color: #fff; }
.video-actions .player-choice {
  min-height: 34px;
  padding: 7px 10px;
}
.library-head { align-items: center; }
.home-banner {
  margin: 16px 0 4px;
}
.home-banner.carousel {
  position: relative;
  aspect-ratio: 1180 / 260;
  overflow: hidden;
  border-radius: 8px;
  background: #0b1118;
}
.home-banner.stack {
  display: grid;
  gap: 12px;
}
.banner-slide {
  width: 100%;
}
.home-banner.carousel .banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s ease;
}
.home-banner.carousel .banner-slide.active {
  opacity: 1;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.home-banner.stack .banner-slide img {
  aspect-ratio: 1180 / 260;
}
.page-ads {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.page-ads.top_banner.carousel,
.page-ads.bottom_banner.carousel {
  position: relative;
  display: block;
  aspect-ratio: 1180 / 140;
  overflow: hidden;
  border-radius: 8px;
  background: #0b1118;
}
.page-ads.top_banner.carousel .page-ad,
.page-ads.bottom_banner.carousel .page-ad {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s ease;
}
.page-ads.top_banner.carousel .page-ad.active,
.page-ads.bottom_banner.carousel .page-ad.active {
  opacity: 1;
}
.page-ad img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.page-ads.stack .page-ad img {
  height: auto;
}
.page-ads.carousel .page-ad img {
  height: 100%;
}
.page-ads.top_banner .page-ad img,
.page-ads.bottom_banner .page-ad img {
  aspect-ratio: 1180 / 140;
}
.page-ads.left_sidebar,
.page-ads.right_sidebar {
  position: fixed;
  top: 96px;
  width: 150px;
  z-index: 8;
}
.page-ads.left_sidebar {
  left: max(12px, calc((100vw - 1180px) / 2 - 170px));
}
.page-ads.right_sidebar {
  right: max(12px, calc((100vw - 1180px) / 2 - 170px));
}
.page-ads.left_sidebar .page-ad img,
.page-ads.right_sidebar .page-ad img {
  aspect-ratio: 300 / 600;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px 0 34px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  box-shadow: var(--shadow);
}
.card .preview-wrap {
  border-radius: 8px 8px 0 0;
}
.poster {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--hover-bg), var(--episode-bg));
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.preview-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b1118;
}
.preview-wrap .poster { width: 100%; height: 100%; }
.preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1118;
  z-index: 2;
}
.duration-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  border-radius: 4px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.content-badges {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  display: flex;
  gap: 5px;
}
.content-badge {
  border-radius: 4px;
  padding: 3px 6px;
  background: rgba(12, 122, 114, .88);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.content-badge.sticky {
  background: rgba(201, 79, 50, .9);
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: visible;
}
.title {
  position: relative;
  font-weight: 700;
  line-height: 1.35;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.title:hover {
  overflow: visible;
}
.title:hover::after {
  content: attr(data-full-title);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 5;
  width: min(340px, 80vw);
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  display: block;
  -webkit-line-clamp: unset;
  white-space: normal;
}
.meta { margin-top: 6px; color: var(--muted); font-size: 13px; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 12px;
  color: color-mix(in srgb, var(--muted) 58%, transparent);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
}
.card-category {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-date {
  margin-top: 4px;
  color: color-mix(in srgb, var(--muted) 58%, transparent);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
}
.detail {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 24px 0 34px;
}
.detail .poster { border-radius: 8px; border: 1px solid var(--line); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.episodes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.episodes a { padding: 8px 11px; border-radius: 8px; background: var(--episode-bg); color: var(--text); }
.episodes a.active { background: var(--brand); color: #fff; }
.source-tabs { margin-top: 8px; }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}
.tag-list a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f2f0;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}
.player {
  background: #0b1118;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}
.site-player {
  object-fit: contain;
}
.player[hidden] {
  display: none;
}
.player-shell {
  position: relative;
  background: #0b1118;
}
.player-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 18px;
  text-align: center;
  background: rgba(8, 13, 20, .82);
  color: #fff;
}
.player-status[hidden] {
  display: none;
}
.player-status strong {
  font-size: 20px;
}
.player-status span {
  color: rgba(255, 255, 255, .78);
}
.player-status.failed strong {
  color: #ffb3a8;
}
.player-status::before {
  content: "";
  display: none;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, .28);
  border-top-color: #fff;
  border-radius: 999px;
  animation: player-spin .75s linear infinite;
}
.player-status.spinner-only {
  background: rgba(8, 13, 20, .28);
}
.player-status.spinner-only::before {
  display: block;
}
.player-status.spinner-only strong,
.player-status.spinner-only span {
  display: none;
}
.seek-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  min-width: 74px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(10, 17, 24, .74);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.9);
  transition: opacity .16s ease, transform .16s ease;
}
.seek-hint.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
@keyframes player-spin {
  to { transform: rotate(360deg); }
}
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.side-recommend {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: hidden;
}
.side-recommend h2 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: 0;
}
.side-video-list {
  display: grid;
  gap: 10px;
  max-height: calc(100% - 32px);
  overflow: hidden;
  scroll-behavior: smooth;
}
.side-video {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.side-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #0b1118;
}
.side-thumb .poster {
  width: 100%;
  height: 100%;
}
.side-title {
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-scroll-arrow {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 34px;
  min-height: 26px;
  padding: 0;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(12, 122, 114, .94);
  box-shadow: 0 8px 18px rgba(24, 32, 42, .18);
  font-size: 20px;
  line-height: 1;
}
.side-scroll-arrow[hidden] {
  display: none;
}
.play-info {
  margin: 14px 0 24px;
  padding: 14px 16px;
}
.play-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: 0;
}
.play-info .episodes {
  margin-top: 8px;
}
.play-info .summary {
  margin: 10px 0 0;
  color: var(--text);
  line-height: 1.55;
  max-width: 820px;
}
.prev-next-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.prev-next-links a {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--brand-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-section {
  padding-bottom: 34px;
}
.home-section .grid {
  padding-top: 14px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 0;
}
.section-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}
.admin-section-head {
  margin: 0 0 12px;
}
.admin-section-head h2 {
  font-size: 20px;
}
.related-grid {
  padding-top: 14px;
}
.related-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: #15202b; color: #dbe3ea; padding: 18px; }
.sidebar .logo { color: #fff; display: block; margin-bottom: 18px; }
.sidebar a { display: block; padding: 10px 12px; border-radius: 8px; color: #dbe3ea; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.12); }
.main { padding: 24px; }
.admin-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}
.admin-breadcrumb a {
  background: transparent;
  min-height: auto;
  padding: 0;
  color: var(--brand-strong);
}
.admin-breadcrumb strong {
  color: var(--text);
}
.admin-user {
  color: var(--muted);
  font-size: 13px;
}
.admin-topbar a {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #e9edf2;
  color: var(--text);
}
.admin-topbar a:hover, .admin-topbar a.active {
  background: #e7f2f0;
  color: var(--brand-strong);
}
.admin-topbar .inline-form {
  margin: 0;
}
.admin-topbar .link-button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #e9edf2;
  color: var(--text);
}
.admin-topbar .link-button:hover {
  background: #e7f2f0;
  color: var(--brand-strong);
}
.admin-topbar .admin-icon-link {
  width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}
.collect-queue-widget {
  position: sticky;
  top: 12px;
  z-index: 30;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 94%, var(--brand) 6%);
  box-shadow: var(--shadow);
}
.collect-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.collect-queue-head strong {
  color: var(--text);
}
.collect-queue-head span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--button-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}
.collect-queue-head span.is-failed {
  color: #b42318;
}
.collect-queue-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--episode-bg);
}
.collect-queue-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .25s ease;
}
.collect-queue-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.collect-queue-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.collect-queue-link {
  display: inline-flex;
  margin-top: 0;
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--brand-strong);
  font-size: 12px;
}
.collect-queue-stop {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}
.collect-queue-stop:disabled {
  opacity: .55;
  cursor: default;
}
.settings-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}
.settings-tabs a {
  padding: 9px 12px;
  border-radius: 8px;
  background: #e9edf2;
  color: var(--text);
}
.settings-tabs a.active, .settings-tabs a:hover {
  background: #e7f2f0;
  color: var(--brand-strong);
}
.player-edit {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.player-edit:first-of-type {
  border-top: 0;
}
.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; background: var(--panel-soft); }
.log-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.log-row:last-child { border-bottom: 0; }
.child-category-row td { background: var(--child-row-bg); }
.sort-input { width: 76px; min-width: 76px; }
.bound-row td:nth-child(2),
.bound-text {
  color: #c82424;
  font-weight: 700;
}
.bound-text { margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.group-transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}
.group-transfer-action {
  min-width: 92px;
  justify-content: center;
}
.field label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.notice { padding: 11px 12px; border-radius: 8px; background: var(--hover-bg); color: var(--brand-strong); margin-bottom: 14px; }
.collect-log-skipped { color: #dc2626; }
.collect-stat-updated { color: #2563eb; font-weight: 700; }
.collect-stat-new { color: #dc2626; font-weight: 700; }
.collect-stat-error { color: #dc2626; }
.playback-pending { color: #dc2626; font-weight: 700; }
.playback-ok { color: var(--muted); }
.failure-log {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.collect-check-progress { height: 12px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.collect-check-progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .2s ease; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.batch-status-field {
  grid-column: 1 / -1;
}
.batch-status-log {
  min-height: 180px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
  background: var(--panel-soft);
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}
.permission-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.role-edit {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.role-edit:first-of-type {
  border-top: 0;
}
.admin-card-list {
  display: grid;
  gap: 12px;
}
.admin-card-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.modal {
  width: min(520px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(16, 24, 32, .42); }
.modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
}
.modal-body h2 { margin: 0; }
.confirm-modal {
  width: min(420px, calc(100% - 32px));
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi-card h2 {
  margin: 0;
  font-size: 30px;
}
.server-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.server-status-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.server-status-item span,
.server-status-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.server-status-item strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
}
.server-status-item .status-ok {
  color: var(--brand-strong);
}
.server-status-item .status-warn {
  color: #b42318;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.mini-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 150px;
  padding-top: 12px;
}
.mini-bar {
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: var(--brand);
}
.mini-bar.secondary {
  background: var(--accent);
}
.chart-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 0 34px;
  flex-wrap: wrap;
}
.page-btn,
.page-num,
.page-jump,
.page-ellipsis {
  min-height: 28px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.page-btn {
  min-width: 68px;
  padding: 0 9px;
}
.page-num {
  min-width: 30px;
  padding: 0 7px;
}
.page-ellipsis {
  min-width: 30px;
  padding: 0 7px;
  border-color: transparent;
  background: transparent;
}
.page-num.active {
  background: #d9e8f2;
  font-weight: 800;
}
.page-btn.disabled {
  pointer-events: none;
  opacity: .45;
}
.page-jump {
  gap: 5px;
  padding: 0 8px;
}
.page-jump input {
  width: 36px;
  min-height: 20px;
  padding: 1px 4px;
  border-radius: 0;
  font-size: 14px;
}
.empty { padding: 34px; text-align: center; color: var(--muted); }
.site-footer {
  margin-top: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.friend-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}
.friend-links span {
  color: var(--text);
  font-weight: 700;
}
.friend-links a {
  color: var(--brand-strong);
}
.friend-link-edit {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.friend-link-edit:first-of-type {
  border-top: 0;
}
.home-layout-edit {
  position: relative;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.home-layout-edit:first-of-type {
  border-top: 0;
}
.banner-edit {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.banner-edit:first-of-type {
  border-top: 0;
}
.ad-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.ad-edit-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.ad-edit-card:first-of-type {
  border-top: 1px solid var(--line);
}
.ad-card-body {
  min-width: 0;
}
.ad-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ad-badge,
.ad-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.ad-badge {
  background: var(--hover-bg);
  color: var(--brand-strong);
}
.ad-status.is-on {
  background: var(--hover-bg);
  color: var(--brand-strong);
}
.ad-status.is-off {
  background: #f1e7e7;
  color: #b42318;
}
.banner-preview {
  width: min(360px, 100%);
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #0b1118;
}
.ad-card-preview {
  width: 100%;
  margin-bottom: 0;
  align-self: start;
}
.banner-preview img {
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
}
.list-position {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7f2f0;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 760px) {
  .nav { padding: 12px 0; }
  .navlinks { order: 10; flex-basis: 100%; overflow: visible; }
  .search { width: 100%; }
  .search-tools { width: 100%; }
  .library-links { margin-left: auto; }
  .search-tools .search { flex: 1; }
  .advanced-search-panel { position: fixed; top: 50%; right: 16px; left: 16px; width: auto; transform: translateY(-50%); }
  .search input { flex: 1; width: auto; }
  .site-notice-trigger { margin-left: auto; }
  .site-notice-overlay { padding: 14px; align-items: start; overflow-y: auto; }
  .site-notice-card { border-radius: 22px; margin-top: 18px; }
  .site-notice-head {
    min-height: 96px;
    grid-template-columns: 42px 1fr 34px;
    gap: 10px;
    padding: 16px;
  }
  .site-notice-head h2 { font-size: 17px; }
  .site-notice-close { width: 34px; min-height: 34px; font-size: 34px; }
  .notice-bell { transform: scale(.78); transform-origin: center; }
  .site-notice-body {
    grid-template-columns: 1fr;
    padding: 20px 18px 22px;
  }
  .site-notice-copy h3 { font-size: 21px; }
  .notice-domain { font-size: 20px; }
  .notice-qr-wrap { padding-top: 0; }
  .notice-download { min-height: 56px; font-size: 19px; }
  .notice-save { min-height: 54px; font-size: 18px; }
  .page-btn, .page-num, .page-jump, .page-ellipsis { font-size: 13px; min-height: 28px; }
  .page-btn { min-width: 68px; }
  .page-ads.left_sidebar,
  .page-ads.right_sidebar {
    position: static;
    width: auto;
  }
  .navitem { position: static; }
  .navitem.open .submenu { display: contents; }
  .detail, .admin-layout, .form-grid, .group-transfer, .watch-layout, .ad-edit-card, .prev-next-links { grid-template-columns: 1fr; }
  .group-transfer-action { justify-content: flex-start; }
  .side-recommend { order: 2; }
  .sidebar { position: static; }
  .main { padding: 16px; }
}

/* Retro VHS front template */
:root[data-template="retro-vhs"] {
  color-scheme: light;
  --bg: #b96836;
  --panel: #f1dfb7;
  --panel-soft: #e5c98e;
  --text: #30291f;
  --muted: #725f48;
  --line: #45392b;
  --brand: #c65731;
  --brand-strong: #9e351f;
  --accent: #d46935;
  --shadow: 4px 5px 0 rgba(58, 39, 25, .48);
  --topbar-bg: rgba(239, 219, 177, .96);
  --input-bg: #f8ebce;
  --hover-bg: #efc77f;
  --button-soft: #dbc28f;
  --episode-bg: #ead3a7;
  --child-row-bg: #e8d0a3;
}
:root[data-template="retro-vhs"] body {
  background-color: #b86c3e;
  background-image:
    radial-gradient(circle at 16% 20%, rgba(255,255,255,.13) 0 1px, transparent 1.5px),
    radial-gradient(circle at 77% 65%, rgba(68,42,24,.12) 0 1px, transparent 1.5px),
    repeating-linear-gradient(0deg, rgba(75,40,21,.05) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, #a95630, #c47b48 48%, #aa5933);
  background-size: 23px 23px, 31px 31px, auto, auto;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
:root[data-template="retro-vhs"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .2;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(55,35,20,.12) 4px);
  mix-blend-mode: multiply;
}
:root[data-template="retro-vhs"] .wrap { width: min(1240px, calc(100% - 48px)); }
:root[data-template="retro-vhs"] .topbar {
  position: relative;
  border: 0;
  border-bottom: 3px solid var(--line);
  background: linear-gradient(#f4e5c4, #e7c98d);
  box-shadow: 0 5px 0 rgba(61,43,28,.24);
}
:root[data-template="retro-vhs"] .nav { min-height: 86px; }
:root[data-template="retro-vhs"] .logo {
  color: #32271e;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 28px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #d76e3e;
}
:root[data-template="retro-vhs"] .logo::before { content: "◉ "; color: #b84829; }
:root[data-template="retro-vhs"] .navlinks a,
:root[data-template="retro-vhs"] .library-links a,
:root[data-template="retro-vhs"] .advanced-search summary {
  color: #33291f;
  font-family: Impact, "Arial Narrow", sans-serif;
  letter-spacing: .045em;
  text-transform: uppercase;
}
:root[data-template="retro-vhs"] .navlinks a:hover,
:root[data-template="retro-vhs"] .library-links a:hover { color: #b54829; }
:root[data-template="retro-vhs"] .submenu,
:root[data-template="retro-vhs"] .advanced-search-panel {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #f4e4c1;
  box-shadow: var(--shadow);
}
:root[data-template="retro-vhs"] .search input,
:root[data-template="retro-vhs"] input,
:root[data-template="retro-vhs"] select,
:root[data-template="retro-vhs"] textarea {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #f7e9ca;
  box-shadow: inset 2px 2px 0 rgba(71,48,30,.12);
}
:root[data-template="retro-vhs"] button,
:root[data-template="retro-vhs"] .btn,
:root[data-template="retro-vhs"] .page-btn,
:root[data-template="retro-vhs"] .page-num {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #d86638;
  color: #2e241b;
  box-shadow: 2px 3px 0 rgba(58,39,25,.42);
  font-family: Impact, "Arial Narrow", sans-serif;
  letter-spacing: .04em;
}
:root[data-template="retro-vhs"] main.wrap {
  margin-top: 22px;
  margin-bottom: 28px;
  padding: 22px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: #e7c788;
  box-shadow: 8px 10px 0 rgba(57,38,23,.4), inset 0 0 45px rgba(139,75,34,.13);
}
:root[data-template="retro-vhs"] .home-banner.carousel,
:root[data-template="retro-vhs"] .banner-slide img,
:root[data-template="retro-vhs"] .page-ads.carousel { border-radius: 10px; }
:root[data-template="retro-vhs"] .home-banner.carousel {
  margin-top: 0;
  border: 3px solid var(--line);
  background: #3b3128;
  box-shadow: var(--shadow);
}
:root[data-template="retro-vhs"] .home-section { margin-top: 26px; }
:root[data-template="retro-vhs"] .section-head {
  padding: 8px 12px;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: rgba(248,233,199,.62);
}
:root[data-template="retro-vhs"] .section-head h2,
:root[data-template="retro-vhs"] .hero h1 {
  font-family: Impact, "Arial Narrow", sans-serif;
  font-weight: 500;
  letter-spacing: .055em;
  text-transform: uppercase;
}
:root[data-template="retro-vhs"] .section-head h2::before { content: "● REC  "; color: #b94327; font-size: .72em; }
:root[data-template="retro-vhs"] .grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 30px 20px;
  padding: 16px 10px 8px;
}
:root[data-template="retro-vhs"] .card {
  overflow: visible;
  border: 0;
  border-radius: 2px;
  background: #f3ead4;
  box-shadow: 3px 5px 0 rgba(58,39,25,.38), 0 8px 16px rgba(58,39,25,.18);
  transform: rotate(-1.1deg);
  transition: transform .2s ease, box-shadow .2s ease;
}
:root[data-template="retro-vhs"] .card:nth-child(3n+2) { transform: rotate(1.25deg); }
:root[data-template="retro-vhs"] .card:nth-child(4n) { transform: rotate(-.45deg); }
:root[data-template="retro-vhs"] .card:hover {
  z-index: 3;
  transform: rotate(0) translateY(-7px) scale(1.025);
  box-shadow: 5px 9px 0 rgba(58,39,25,.42), 0 16px 24px rgba(58,39,25,.22);
}
:root[data-template="retro-vhs"] .card .preview-wrap {
  margin: 11px 11px 0;
  border: 3px solid #332b23;
  border-radius: 1px;
  filter: saturate(.72) sepia(.12) contrast(.93);
}
:root[data-template="retro-vhs"] .card-body { padding: 10px 13px 17px; }
:root[data-template="retro-vhs"] .title {
  min-height: 42px;
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.18;
  text-transform: uppercase;
}
:root[data-template="retro-vhs"] .card-category { color: #a44328; font-weight: 800; }
:root[data-template="retro-vhs"] .card-date { color: #766149; }
:root[data-template="retro-vhs"] .duration-badge { border-radius: 0; background: rgba(44,36,29,.86); }
:root[data-template="retro-vhs"] .content-badge { border: 1px solid #3e3024; border-radius: 2px; background: #cf6638; }
:root[data-template="retro-vhs"] .panel,
:root[data-template="retro-vhs"] .detail,
:root[data-template="retro-vhs"] .sidebar,
:root[data-template="retro-vhs"] .hero {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(246,230,195,.88);
  box-shadow: var(--shadow);
}
:root[data-template="retro-vhs"] .player-shell {
  border: 5px solid #3b3026;
  border-radius: 12px;
  background: #28231f;
  box-shadow: 6px 8px 0 rgba(58,39,25,.45);
}
:root[data-template="retro-vhs"] .episode-link,
:root[data-template="retro-vhs"] .tag-link { border: 1px solid #564332; }
:root[data-template="retro-vhs"] .site-footer {
  border-top: 3px solid var(--line);
  background: #e1bd7b;
  color: #4a3b2d;
  box-shadow: inset 0 5px 0 rgba(89,54,30,.12);
}
@media (max-width: 760px) {
  :root[data-template="retro-vhs"] .wrap { width: min(100% - 20px, 1240px); }
  :root[data-template="retro-vhs"] .nav { min-height: 70px; }
  :root[data-template="retro-vhs"] main.wrap { margin-top: 12px; padding: 12px; border-radius: 15px; }
  :root[data-template="retro-vhs"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; padding-inline: 0; }
  :root[data-template="retro-vhs"] .card .preview-wrap { margin: 7px 7px 0; border-width: 2px; }
  :root[data-template="retro-vhs"] .card-body { padding: 8px 9px 12px; }
  :root[data-template="retro-vhs"] .title { min-height: 36px; font-size: 14px; }
}

/* Dark cinema front template */
:root[data-template="dark-cinema"] {
  color-scheme: dark;
  --bg: #090a0e;
  --panel: #121319;
  --panel-soft: #181a22;
  --text: #f4f1eb;
  --muted: #9d9aa4;
  --line: #292a32;
  --brand: #d5a23f;
  --brand-strong: #f2c866;
  --accent: #b93632;
  --shadow: 0 18px 44px rgba(0, 0, 0, .38);
  --topbar-bg: rgba(8, 9, 12, .9);
  --input-bg: #0d0e13;
  --hover-bg: #262016;
  --button-soft: #24252d;
  --episode-bg: #1d1e25;
  --child-row-bg: #191a20;
}
:root[data-template="dark-cinema"] body {
  background:
    radial-gradient(circle at 50% -12%, rgba(174, 119, 32, .18), transparent 34rem),
    linear-gradient(180deg, #0c0d12 0, #08090c 70vh);
  background-attachment: fixed;
}
:root[data-template="dark-cinema"] .wrap { width: min(1320px, calc(100% - 40px)); }
:root[data-template="dark-cinema"] .topbar {
  border-bottom-color: rgba(213, 162, 63, .18);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .32);
}
:root[data-template="dark-cinema"] .nav { min-height: 76px; }
:root[data-template="dark-cinema"] .logo {
  color: var(--brand-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  letter-spacing: .08em;
  text-shadow: 0 0 24px rgba(242, 200, 102, .2);
}
:root[data-template="dark-cinema"] .navlinks a,
:root[data-template="dark-cinema"] .nav-parent,
:root[data-template="dark-cinema"] .pill { border-radius: 999px; }
:root[data-template="dark-cinema"] .search input { border-color: #343039; border-radius: 999px; }
:root[data-template="dark-cinema"] button,
:root[data-template="dark-cinema"] .btn { border-radius: 999px; }
:root[data-template="dark-cinema"] .theme-toggle,
:root[data-template="dark-cinema"] .site-notice-trigger {
  background: linear-gradient(145deg, #2a2114, #72501c);
  box-shadow: inset 0 0 0 1px rgba(242, 200, 102, .16), 0 8px 22px rgba(0, 0, 0, .35);
}
:root[data-template="dark-cinema"] .theme-toggle { display: none; }
:root[data-template="dark-cinema"] .home-banner.carousel,
:root[data-template="dark-cinema"] .banner-slide img,
:root[data-template="dark-cinema"] .page-ads.carousel { border-radius: 16px; }
:root[data-template="dark-cinema"] .home-banner.carousel {
  margin-top: 24px;
  border: 1px solid rgba(213, 162, 63, .22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5), 0 0 50px rgba(160, 104, 25, .08);
}
:root[data-template="dark-cinema"] .home-section { margin-top: 18px; }
:root[data-template="dark-cinema"] .section-head {
  border-bottom: 1px solid rgba(213, 162, 63, .16);
  padding-bottom: 12px;
}
:root[data-template="dark-cinema"] .section-head h2,
:root[data-template="dark-cinema"] .hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .035em;
}
:root[data-template="dark-cinema"] .section-head h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1em;
  margin-right: 10px;
  border-radius: 99px;
  background: linear-gradient(#f2c866, #9b651c);
  vertical-align: -.08em;
  box-shadow: 0 0 16px rgba(242, 200, 102, .36);
}
:root[data-template="dark-cinema"] .grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px 18px;
}
:root[data-template="dark-cinema"] .card {
  border-color: rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: linear-gradient(160deg, #18191f, #101116 70%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
  transform: translateY(0);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .32s ease, color .32s ease;
}
:root[data-template="dark-cinema"] .card:hover {
  z-index: 4;
  transform: translateY(-7px);
  border-color: rgba(242, 200, 102, .38);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .55), 0 0 28px rgba(194, 133, 39, .1);
}
:root[data-template="dark-cinema"] .card .preview-wrap { border-radius: 11px 11px 0 0; }
:root[data-template="dark-cinema"] .card-body { padding: 13px 13px 14px; }
:root[data-template="dark-cinema"] .title { font-size: 15px; }
:root[data-template="dark-cinema"] .card-category { color: #c7a45e; }
:root[data-template="dark-cinema"] .content-badge { background: rgba(181, 126, 38, .94); }
:root[data-template="dark-cinema"] .content-badge.sticky { background: rgba(159, 42, 38, .94); }
:root[data-template="dark-cinema"] .panel,
:root[data-template="dark-cinema"] .detail,
:root[data-template="dark-cinema"] .sidebar {
  border-color: rgba(255, 255, 255, .07);
  background: linear-gradient(155deg, rgba(25, 26, 33, .98), rgba(14, 15, 20, .98));
  box-shadow: var(--shadow);
}
:root[data-template="dark-cinema"] .player-shell {
  border: 1px solid rgba(213, 162, 63, .2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .65), 0 0 60px rgba(143, 91, 20, .1);
}
:root[data-template="dark-cinema"] .site-footer {
  border-top-color: rgba(213, 162, 63, .16);
  background: rgba(8, 9, 12, .82);
}
@media (max-width: 760px) {
  :root[data-template="dark-cinema"] .wrap { width: min(100% - 24px, 1320px); }
  :root[data-template="dark-cinema"] .nav { min-height: 66px; }
  :root[data-template="dark-cinema"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  :root[data-template="dark-cinema"] .card-body { padding: 10px; }
  :root[data-template="dark-cinema"] .title { min-height: 38px; font-size: 14px; }
  :root[data-template="dark-cinema"] .home-banner.carousel { margin-top: 14px; border-radius: 11px; }
}

/* Neon content hub front template */
:root[data-template="neon-hub"] {
  color-scheme: dark;
  --bg: #050b18;
  --panel: #0b172b;
  --panel-soft: #0e1d35;
  --text: #e7f8ff;
  --muted: #75a3b6;
  --line: rgba(71, 218, 255, .23);
  --brand: #42e8ff;
  --brand-strong: #7af3ff;
  --accent: #d85cff;
  --shadow: 0 18px 48px rgba(0, 0, 0, .48);
  --topbar-bg: rgba(5, 11, 24, .9);
  --input-bg: #060f20;
  --hover-bg: rgba(66, 232, 255, .09);
  --button-soft: #10223d;
  --episode-bg: #0c1c32;
  --child-row-bg: #0d1b30;
}
:root[data-template="neon-hub"] body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(60, 217, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 217, 255, .025) 1px, transparent 1px),
    radial-gradient(circle at 82% 12%, rgba(137, 63, 255, .14), transparent 28rem),
    radial-gradient(circle at 8% 26%, rgba(35, 211, 255, .1), transparent 30rem),
    #050b18;
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
}
:root[data-template="neon-hub"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(5,11,24,.22) 3px 4px);
}
:root[data-template="neon-hub"] .wrap { width: min(1380px, calc(100% - 48px)); }
:root[data-template="neon-hub"] .topbar {
  border-bottom: 1px solid rgba(66,232,255,.58);
  box-shadow: 0 3px 0 rgba(216,92,255,.32), 0 12px 40px rgba(0,0,0,.45);
}
:root[data-template="neon-hub"] .nav { min-height: 82px; }
:root[data-template="neon-hub"] .logo {
  color: transparent;
  background: linear-gradient(100deg, #6cf5ff 15%, #d45dff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(21px, 2vw, 31px);
  font-style: italic;
  letter-spacing: .08em;
  text-transform: uppercase;
  filter: drop-shadow(0 0 9px rgba(84,226,255,.42));
}
:root[data-template="neon-hub"] .logo::before { content: "▦ "; color: #63efff; }
:root[data-template="neon-hub"] .navlinks { order: 0; flex: 1; flex-wrap: nowrap; justify-content: center; padding: 0; }
:root[data-template="neon-hub"] .navlinks a,
:root[data-template="neon-hub"] .nav-parent,
:root[data-template="neon-hub"] .library-links a { border-radius: 2px; letter-spacing: .08em; text-transform: uppercase; }
:root[data-template="neon-hub"] .navlinks a:hover,
:root[data-template="neon-hub"] .nav-parent:hover { text-shadow: 0 0 12px var(--brand); }
:root[data-template="neon-hub"] .search input { border-radius: 3px; border-color: rgba(66,232,255,.34); }
:root[data-template="neon-hub"] button,
:root[data-template="neon-hub"] .btn { border-radius: 2px; border-color: rgba(66,232,255,.42); background: linear-gradient(135deg, #11294a, #173b60); color: #83f5ff; }
:root[data-template="neon-hub"] .theme-toggle,
:root[data-template="neon-hub"] .site-notice-trigger { display: none; }
:root[data-template="neon-hub"] main.wrap { padding-top: 22px; }
:root[data-template="neon-hub"] .cyber-tabs { display: flex; gap: 10px; margin: 22px 0 8px; overflow-x: auto; border-bottom: 1px solid rgba(66,232,255,.17); }
:root[data-template="neon-hub"] .cyber-tabs a { position: relative; flex: 0 0 auto; padding: 13px 25px; color: #7ba7b9; font-weight: 700; letter-spacing: .06em; }
:root[data-template="neon-hub"] .cyber-tabs a::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; background: #ca5cff; box-shadow: 0 0 9px #ca5cff; transform: scaleX(0); transition: transform .22s ease; }
:root[data-template="neon-hub"] .cyber-tabs a:hover,
:root[data-template="neon-hub"] .cyber-tabs a.active { color: #7af3ff; text-shadow: 0 0 12px rgba(66,232,255,.5); }
:root[data-template="neon-hub"] .cyber-tabs a:hover::after,
:root[data-template="neon-hub"] .cyber-tabs a.active::after { transform: scaleX(1); }
:root[data-template="neon-hub"] .home-banner.carousel { margin-top: 0; border: 1px solid rgba(66,232,255,.34); border-radius: 2px; box-shadow: 0 0 30px rgba(66,232,255,.08); }
:root[data-template="neon-hub"] .home-section { margin-top: 27px; }
:root[data-template="neon-hub"] .section-head { padding-bottom: 10px; border-bottom: 1px solid rgba(66,232,255,.2); }
:root[data-template="neon-hub"] .section-head h2 { font-size: 18px; letter-spacing: .12em; text-transform: uppercase; }
:root[data-template="neon-hub"] .section-head h2::before { content: "//"; margin-right: 10px; color: #dd63ff; text-shadow: 0 0 10px #b948e0; }
:root[data-template="neon-hub"] .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
:root[data-template="neon-hub"] .card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(86,192,237,.22);
  border-radius: 5px;
  background: linear-gradient(145deg, #0d1c33, #091426);
  box-shadow: 0 12px 28px rgba(0,0,0,.33), inset 0 1px rgba(133,225,255,.04);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
:root[data-template="neon-hub"] .card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(74,230,255,.14), transparent 42%); opacity: 0; transition: opacity .25s; }
:root[data-template="neon-hub"] .card:hover { z-index: 2; transform: translateY(-7px) scale(1.015); border-color: #4feeff; box-shadow: 0 0 0 1px rgba(220,80,255,.45), 0 0 28px rgba(54,224,255,.2), 0 20px 42px rgba(0,0,0,.5); }
:root[data-template="neon-hub"] .card:hover::after { opacity: 1; }
:root[data-template="neon-hub"] .card .preview-wrap { border-radius: 4px 4px 0 0; }
:root[data-template="neon-hub"] .card .preview-wrap::after { content: "▶"; position: absolute; top: 50%; left: 50%; display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid #62efff; border-radius: 50%; background: rgba(6,17,34,.74); color: #78f5ff; opacity: 0; transform: translate(-50%,-45%) scale(.8); box-shadow: 0 0 20px rgba(68,226,255,.36); transition: .23s ease; }
:root[data-template="neon-hub"] .card:hover .preview-wrap::after { opacity: 1; transform: translate(-50%,-50%) scale(1); }
:root[data-template="neon-hub"] .card-body { padding: 13px 14px 15px; }
:root[data-template="neon-hub"] .title { font-size: 16px; letter-spacing: .015em; }
:root[data-template="neon-hub"] .card-category { color: #58eaff; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
:root[data-template="neon-hub"] .card-date { color: #6e8295; font-family: monospace; }
:root[data-template="neon-hub"] .duration-badge { border: 1px solid rgba(76,235,255,.35); border-radius: 2px; background: rgba(4,13,27,.8); color: #8ff7ff; }
:root[data-template="neon-hub"] .content-badge { border-radius: 2px; background: #7642ac; }
:root[data-template="neon-hub"] .content-badge.sticky { background: #c43f95; }
:root[data-template="neon-hub"] .panel,
:root[data-template="neon-hub"] .detail,
:root[data-template="neon-hub"] .sidebar,
:root[data-template="neon-hub"] .hero { border-color: rgba(72,218,255,.24); border-radius: 4px; background: rgba(10,24,44,.94); }
:root[data-template="neon-hub"] .player-shell { border: 1px solid #54eaff; border-radius: 4px; box-shadow: 0 0 0 2px rgba(211,82,255,.3), 0 0 38px rgba(54,220,255,.18); }
:root[data-template="neon-hub"] .site-footer { border-top-color: rgba(73,227,255,.32); background: rgba(4,10,22,.94); }
@media (max-width: 900px) {
  :root[data-template="neon-hub"] .navlinks { order: 10; flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; }
}
@media (max-width: 760px) {
  :root[data-template="neon-hub"] .wrap { width: min(100% - 20px, 1380px); }
  :root[data-template="neon-hub"] main.wrap { padding-top: 12px; }
  :root[data-template="neon-hub"] .cyber-tabs a { padding: 12px 15px; }
  :root[data-template="neon-hub"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  :root[data-template="neon-hub"] .card-body { padding: 10px; }
  :root[data-template="neon-hub"] .title { min-height: 38px; font-size: 14px; }
}

/* Anime neon front template — visual theme only; the original site layout stays intact. */
:root[data-template="anime-neon"] {
  color-scheme: dark;
  --bg: #080b0f;
  --panel: #11161d;
  --panel-soft: #171d26;
  --text: #f7f8fb;
  --muted: #929ba8;
  --line: rgba(166, 180, 196, .18);
  --brand: #e51c48;
  --brand-strong: #ff365e;
  --accent: #31c7ec;
  --shadow: 0 16px 38px rgba(0, 0, 0, .42);
  --topbar-bg: rgba(8, 11, 15, .92);
  --input-bg: #0d1218;
  --hover-bg: rgba(229, 28, 72, .13);
  --button-soft: #202731;
  --episode-bg: #1a212b;
  --child-row-bg: #161d25;
}
:root[data-template="anime-neon"] body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% 8%, rgba(40, 177, 222, .12), transparent 28rem),
    radial-gradient(circle at 5% 35%, rgba(229, 28, 72, .1), transparent 30rem),
    linear-gradient(180deg, #0b0f14 0, #07090c 65vh);
  background-attachment: fixed;
  font-family: Inter, "Noto Sans SC", "Segoe UI", sans-serif;
}
:root[data-template="anime-neon"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .3;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 100% 4px;
}
:root[data-template="anime-neon"] .topbar {
  border-bottom-color: rgba(255, 255, 255, .09);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .34), inset 0 -2px rgba(229, 28, 72, .42);
}
:root[data-template="anime-neon"] .logo {
  color: #fff;
  font-size: 23px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-shadow: 3px 0 0 rgba(229, 28, 72, .8), 0 0 18px rgba(229, 28, 72, .2);
}
:root[data-template="anime-neon"] .logo::before { content: "▲"; margin-right: 7px; color: #e51c48; font-size: .8em; }
:root[data-template="anime-neon"] .navlinks a,
:root[data-template="anime-neon"] .nav-parent,
:root[data-template="anime-neon"] .library-links a { font-weight: 700; letter-spacing: .025em; }
:root[data-template="anime-neon"] .navlinks a:hover,
:root[data-template="anime-neon"] .nav-parent:hover,
:root[data-template="anime-neon"] .navitem.open .nav-parent {
  color: #fff;
  background: linear-gradient(100deg, rgba(229,28,72,.22), rgba(229,28,72,.04));
  box-shadow: inset 3px 0 #e51c48;
}
:root[data-template="anime-neon"] .submenu,
:root[data-template="anime-neon"] .advanced-search-panel { border-color: rgba(229, 28, 72, .28); background: rgba(15, 20, 27, .98); }
:root[data-template="anime-neon"] .search input { border-color: rgba(255,255,255,.16); border-radius: 999px; }
:root[data-template="anime-neon"] button,
:root[data-template="anime-neon"] .btn { border-color: rgba(229,28,72,.42); border-radius: 999px; background: linear-gradient(135deg, #e51c48, #bd1237); color: #fff; }
:root[data-template="anime-neon"] .btn.secondary,
:root[data-template="anime-neon"] .advanced-search summary { background: #202630; color: #fff; }
:root[data-template="anime-neon"] .theme-toggle,
:root[data-template="anime-neon"] .site-notice-trigger { display: none; }
:root[data-template="anime-neon"] .home-banner.carousel,
:root[data-template="anime-neon"] .banner-slide img,
:root[data-template="anime-neon"] .page-ads.carousel { border-radius: 15px; }
:root[data-template="anime-neon"] .home-banner.carousel {
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 22px 60px rgba(0,0,0,.52), 0 0 0 1px rgba(229,28,72,.08);
}
:root[data-template="anime-neon"] .section-head { padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
:root[data-template="anime-neon"] .section-head h2,
:root[data-template="anime-neon"] .hero h1 { font-weight: 900; letter-spacing: -.025em; }
:root[data-template="anime-neon"] .section-head h2::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 5px;
  margin-right: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, #e51c48 0 68%, #36c3e7 68%);
  vertical-align: .18em;
  box-shadow: 0 0 12px rgba(229,28,72,.48);
}
:root[data-template="anime-neon"] .card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,255,255,.09);
  border-radius: 12px;
  background: linear-gradient(155deg, #161c24, #0e1218);
  box-shadow: 0 13px 30px rgba(0,0,0,.34);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
:root[data-template="anime-neon"] .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 4;
  width: 3px;
  background: linear-gradient(#e51c48, transparent 52%, #2fc7ec);
  opacity: .72;
  pointer-events: none;
}
:root[data-template="anime-neon"] .card:hover { z-index: 3; transform: translateY(-6px); border-color: rgba(229,28,72,.5); box-shadow: 0 22px 44px rgba(0,0,0,.55), 0 0 26px rgba(229,28,72,.13); }
:root[data-template="anime-neon"] .card .preview-wrap { border-radius: 11px 11px 0 0; }
:root[data-template="anime-neon"] .card .preview-wrap::after { content: "▶"; position: absolute; right: 12px; bottom: 12px; z-index: 3; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(219,20,62,.88); color: #fff; opacity: 0; transform: scale(.8); transition: .22s ease; box-shadow: 0 0 18px rgba(229,28,72,.4); }
:root[data-template="anime-neon"] .card:hover .preview-wrap::after { opacity: 1; transform: scale(1); }
:root[data-template="anime-neon"] .card-body { padding: 12px 13px 14px; }
:root[data-template="anime-neon"] .title { font-size: 15px; }
:root[data-template="anime-neon"] .card-category { color: #47c9e9; font-weight: 700; }
:root[data-template="anime-neon"] .duration-badge { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(5,8,12,.78); }
:root[data-template="anime-neon"] .content-badge { border-radius: 999px; background: rgba(229,28,72,.92); }
:root[data-template="anime-neon"] .content-badge.sticky { background: #d21743; box-shadow: 0 0 12px rgba(229,28,72,.34); }
:root[data-template="anime-neon"] .panel,
:root[data-template="anime-neon"] .detail,
:root[data-template="anime-neon"] .sidebar,
:root[data-template="anime-neon"] .hero { border-color: rgba(255,255,255,.1); border-radius: 12px; background: linear-gradient(145deg, rgba(20,26,34,.98), rgba(12,16,22,.98)); }
:root[data-template="anime-neon"] .player-shell { border: 1px solid rgba(229,28,72,.42); border-radius: 12px; box-shadow: 0 26px 70px rgba(0,0,0,.62), 0 0 34px rgba(229,28,72,.12); }
:root[data-template="anime-neon"] .episodes a.active { background: linear-gradient(135deg, #ed2450, #bb1135); }
:root[data-template="anime-neon"] .site-footer { border-top-color: rgba(229,28,72,.25); background: rgba(7,9,13,.9); }
@media (max-width: 760px) {
  :root[data-template="anime-neon"] .home-banner.carousel { border-radius: 10px; }
  :root[data-template="anime-neon"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  :root[data-template="anime-neon"] .card-body { padding: 9px 10px 11px; }
  :root[data-template="anime-neon"] .title { min-height: 38px; font-size: 14px; }
}

/* Anime aurora — same structure as Anime Neon, with cyan/magenta glass styling. */
:root[data-template="anime-aurora"] {
  color-scheme: dark;
  --bg: #071423;
  --panel: #202d3c;
  --panel-soft: #293747;
  --text: #f2f5f8;
  --muted: #a6b2bf;
  --line: rgba(167, 193, 211, .24);
  --brand: #55e4e5;
  --brand-strong: #8af8f2;
  --accent: #ed73bd;
  --shadow: 0 18px 46px rgba(1, 8, 18, .5);
  --topbar-bg: rgba(7, 19, 33, .9);
  --input-bg: rgba(21, 34, 49, .88);
  --hover-bg: rgba(85, 228, 229, .12);
  --button-soft: rgba(50, 66, 83, .84);
  --episode-bg: rgba(42, 56, 72, .88);
  --child-row-bg: rgba(34, 48, 64, .92);
}
:root[data-template="anime-aurora"] body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 15%, rgba(70,222,226,.11), transparent 30rem),
    radial-gradient(circle at 88% 20%, rgba(235,100,185,.1), transparent 32rem),
    linear-gradient(180deg, #091929, #06111e 72vh);
  background-attachment: fixed;
  font-family: "Arial Narrow", "Roboto Condensed", "Noto Sans SC", "Segoe UI", sans-serif;
}
:root[data-template="anime-aurora"] .topbar {
  border-bottom-color: rgba(121, 236, 235, .2);
  box-shadow: 0 14px 38px rgba(1,8,18,.42), inset 0 -1px rgba(237,115,189,.24);
}
:root[data-template="anime-aurora"] .logo {
  color: #f4f7fa;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-shadow: -2px 0 11px rgba(85,228,229,.35), 2px 0 11px rgba(237,115,189,.28);
}
:root[data-template="anime-aurora"] .logo::before { content: "◇"; margin-right: 8px; color: #71eeed; }
:root[data-template="anime-aurora"] .navlinks a,
:root[data-template="anime-aurora"] .nav-parent,
:root[data-template="anime-aurora"] .library-links a { font-weight: 800; letter-spacing: .015em; text-transform: uppercase; }
:root[data-template="anime-aurora"] .navlinks a:hover,
:root[data-template="anime-aurora"] .nav-parent:hover,
:root[data-template="anime-aurora"] .navitem.open .nav-parent {
  color: #f7ffff;
  background: linear-gradient(90deg, rgba(70,222,226,.22), rgba(237,115,189,.08));
  box-shadow: inset 3px 0 #59e0df, 0 0 16px rgba(83,225,225,.08);
}
:root[data-template="anime-aurora"] .submenu,
:root[data-template="anime-aurora"] .advanced-search-panel {
  border-color: rgba(104,230,230,.3);
  background: rgba(25, 39, 54, .97);
  box-shadow: 0 0 0 1px rgba(237,115,189,.12), 0 18px 46px rgba(0,0,0,.44);
}
:root[data-template="anime-aurora"] .search input { border-color: rgba(126,229,229,.28); border-radius: 13px; }
:root[data-template="anime-aurora"] button,
:root[data-template="anime-aurora"] .btn {
  border-color: rgba(107,235,233,.5);
  border-radius: 12px;
  background: linear-gradient(115deg, rgba(69,207,210,.92), rgba(201,92,168,.9));
  color: #fff;
  font-weight: 800;
}
:root[data-template="anime-aurora"] .btn.secondary,
:root[data-template="anime-aurora"] .advanced-search summary { background: rgba(48,63,81,.94); color: #eef8fa; }
:root[data-template="anime-aurora"] .theme-toggle,
:root[data-template="anime-aurora"] .site-notice-trigger { display: none; }
:root[data-template="anime-aurora"] .home-banner.carousel,
:root[data-template="anime-aurora"] .banner-slide img,
:root[data-template="anime-aurora"] .page-ads.carousel { border-radius: 16px; }
:root[data-template="anime-aurora"] .home-banner.carousel {
  border: 1px solid rgba(115,233,232,.62);
  box-shadow: -5px 0 19px rgba(76,220,222,.18), 5px 0 19px rgba(237,93,180,.17), 0 24px 64px rgba(0,0,0,.5);
}
:root[data-template="anime-aurora"] .section-head { padding-bottom: 10px; border-bottom: 1px solid rgba(151,190,207,.18); }
:root[data-template="anime-aurora"] .section-head h2,
:root[data-template="anime-aurora"] .hero h1 { font-weight: 900; letter-spacing: -.035em; text-transform: uppercase; }
:root[data-template="anime-aurora"] .section-head h2::after {
  content: "";
  display: inline-block;
  width: 72px;
  height: 2px;
  margin-left: 13px;
  background: linear-gradient(90deg, #5be5e4, #ed73bd);
  vertical-align: .28em;
  box-shadow: 0 0 9px rgba(91,229,228,.5), 0 0 9px rgba(237,115,189,.36);
}
:root[data-template="anime-aurora"] .card {
  position: relative;
  overflow: hidden;
  border-color: rgba(157,183,201,.25);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(59,73,89,.92), rgba(31,43,57,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 15px 34px rgba(0,0,0,.36);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
:root[data-template="anime-aurora"] .card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 4;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(91,229,228,.9), transparent 42%, rgba(237,115,189,.82));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .7;
}
:root[data-template="anime-aurora"] .card:hover {
  z-index: 3;
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: -5px 0 21px rgba(79,220,222,.16), 5px 0 21px rgba(237,98,182,.15), 0 24px 48px rgba(0,0,0,.52);
}
:root[data-template="anime-aurora"] .card .preview-wrap { border-radius: 13px 13px 0 0; }
:root[data-template="anime-aurora"] .card .preview-wrap::after {
  content: "▶";
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(158,255,251,.7);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(48,190,195,.92), rgba(191,78,156,.9));
  color: #fff;
  opacity: 0;
  transform: translateY(5px) scale(.88);
  transition: .22s ease;
  box-shadow: 0 0 17px rgba(90,229,228,.33), 0 0 17px rgba(237,115,189,.2);
}
:root[data-template="anime-aurora"] .card:hover .preview-wrap::after { opacity: 1; transform: translateY(0) scale(1); }
:root[data-template="anime-aurora"] .card-body { padding: 12px 13px 14px; }
:root[data-template="anime-aurora"] .title { font-size: 15px; font-weight: 900; letter-spacing: -.02em; }
:root[data-template="anime-aurora"] .card-category { color: #77edeb; font-weight: 800; text-transform: uppercase; }
:root[data-template="anime-aurora"] .duration-badge { border: 1px solid rgba(109,232,231,.4); border-radius: 9px; background: rgba(5,17,29,.78); }
:root[data-template="anime-aurora"] .content-badge { border-radius: 8px; background: linear-gradient(110deg, #3bbdc2, #b6539a); }
:root[data-template="anime-aurora"] .content-badge.sticky { background: #d15aa3; box-shadow: 0 0 13px rgba(237,115,189,.3); }
:root[data-template="anime-aurora"] .panel,
:root[data-template="anime-aurora"] .detail,
:root[data-template="anime-aurora"] .sidebar,
:root[data-template="anime-aurora"] .hero {
  border-color: rgba(130,210,218,.28);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(54,69,86,.94), rgba(25,38,53,.97));
  box-shadow: inset 0 1px rgba(255,255,255,.07), var(--shadow);
}
:root[data-template="anime-aurora"] .player-shell { border: 1px solid #67dfdf; border-radius: 14px; box-shadow: 0 0 0 1px rgba(237,115,189,.38), 0 26px 70px rgba(0,0,0,.58), 0 0 34px rgba(80,218,220,.13); }
:root[data-template="anime-aurora"] .episodes a.active { background: linear-gradient(110deg, #43c8ca, #bd579e); }
:root[data-template="anime-aurora"] .site-footer { border-top-color: rgba(104,225,227,.25); background: rgba(5,15,27,.9); }
@media (max-width: 760px) {
  :root[data-template="anime-aurora"] .home-banner.carousel { border-radius: 11px; }
  :root[data-template="anime-aurora"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  :root[data-template="anime-aurora"] .card-body { padding: 9px 10px 11px; }
  :root[data-template="anime-aurora"] .title { min-height: 38px; font-size: 14px; }
}
