/* Core variables */
:root {
  --bg: #0c1017;
  --surface: #111827;
  --surface-2: #0d1422;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --primary: #10b981;
  --accent: #22d3ee;
  --link-active: var(--accent);
  --radius: 16px;
  /* Chuẩn container: cố định max-width, căn giữa, có gutter hai bên */
  --container-max: 1280px;
  --gutter: 16px;
  --header-h: 64px;
  --section-head-h: 42px;
  --home-sidebar-w: 320px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --season-bg-url: none;
  --season-bg-opacity: 0;
}
[data-theme="light"] {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 10px 26px rgba(0,0,0,.08);
}
[data-season="noel"] { --primary: #22d3ee; --accent: #93c5fd; }
[data-season="tet"] { --primary: #ef4444; --accent: #f59e0b; }
[data-season="halloween"] { --primary: #fb923c; --accent: #fbbf24; }
[data-season="summer"] { --primary: #34d399; --accent: #22d3ee; }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.site { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: visible; }
.site::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--season-bg-url);
  background-size: cover;
  background-position: center;
  opacity: var(--season-bg-opacity);
  pointer-events: none;
  transition: opacity .3s ease;
  filter: saturate(1.1);
  z-index: -1;
}
main { flex: 1; }
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; gap: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.section { margin: 20px 0; }
.global-ad-bar {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 12px var(--gutter);
  display: flex;
  justify-content: center;
}
.global-ad-bar > * {
  width: 100%;
}
.season-ornaments {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}
.season-ornaments span {
  position: absolute;
  top: -40px;
  animation: season-fall 12s linear forwards;
  opacity: .9;
  text-shadow: 0 6px 14px rgba(0,0,0,.5);
  animation-fill-mode: forwards;
}
.season-ornaments span:nth-child(3n) { animation-duration: 9s; }
.season-ornaments span:nth-child(4n) { animation-duration: 7s; }
.season-ornaments span:nth-child(5n) { animation-duration: 6.5s; }
.season-ornaments span:nth-child(2n) { opacity: .6; }
.admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: flex-start; }
.admin-layout.admin-layout--full {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 var(--gutter) 20px;
  min-height: calc(100vh - var(--header-h) - 40px);
}
.admin-layout__sidebar { display: flex; flex-direction: column; gap: 18px; padding: 18px; min-height: 360px; min-height: calc(100vh - var(--header-h) - 40px); }
.admin-sidebar__title { font-weight: 700; font-size: 18px; }
.admin-sidebar__group { display: flex; flex-direction: column; gap: 6px; }
.admin-sidebar__group-label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.admin-sidebar__link { display: block; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; color: var(--text); font-weight: 600; }
.admin-sidebar__link:hover, .admin-sidebar__link:focus-visible { border-color: var(--border); }
.admin-sidebar__link.is-active { background: var(--surface-2); border-color: var(--primary); color: var(--primary); box-shadow: inset 0 0 0 1px rgba(16,185,129,.2); }
.admin-layout__main { padding: 24px; }
@media (max-width: 1000px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-layout__sidebar { min-height: auto; }
}

@keyframes season-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: .9; }
  80% { opacity: .9; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.012);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.27);
  backdrop-filter: blur(28px);
  color: var(--text);
}
.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}
.btn.btn-xs { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }
.input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: #cbd5e1; }
.badge.success { border-color: #065f46; background: #052d22; color: #84f3c2; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.page { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; }
.page.active { background: var(--primary); color: #052e16; border-color: #064e3b; }
.muted { color: var(--muted); }
.hr { height: 1px; background: var(--border); margin: 10px 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(17,24,39,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
[data-theme="light"] .site-header { background: rgba(255,255,255,.9); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 14px; width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.brand { font-weight: 900; font-size: 22px; color: var(--primary); letter-spacing: .2px; }
.brand-icon { margin-right: 6px; font-size: 18px; line-height: 1; display: inline-flex; align-items: center; }
.search { flex: 1; display: flex; gap: 8px; }
.search input { flex: 1; }
.nav { display: flex; align-items: center; gap: 14px; position: relative; }
.nav__link { padding: 8px 10px; border-radius: 10px; line-height: 1; }
.nav__link:hover, .nav__link:focus-visible { background: var(--surface-2); outline: 1px solid var(--border); }
.nav__menu { position: relative; }
.nav__trigger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; }
.nav__dropdown { position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); display: none; }
.nav__dropdown a { display: block; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.nav__dropdown a:hover, .nav__dropdown a:focus-visible { background: var(--surface-2); }
.nav__menu.is-open .nav__dropdown { display: block; }
.hamburger { display: none; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 8px 10px; }
.theme-toggle { margin-left: 6px; border-radius: 999px; border: 1px solid var(--border); padding: 8px 10px; background: var(--surface-2); }
@media (max-width: 960px) {
  .search { order: 3; width: 100%; }
  .nav { position: absolute; right: 12px; top: calc(var(--header-h) + 8px); flex-direction: column; align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; min-width: 230px; display: none; }
  .nav.is-open { display: flex; }
  .hamburger { display: inline-flex; }
}

/* Home layout */
.home-layout { display: grid; grid-template-columns: 1fr var(--home-sidebar-w); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .home-layout { grid-template-columns: 1fr; } }
.section-head { height: var(--section-head-h); display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; white-space: nowrap; }
.section-title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 6px rgba(16,185,129,.14); }

/* Movie grid/cards */
.movie-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.movie-card { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow); }
.movie-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.movie-card .meta { padding: 10px; }
.movie-card .title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-card .sub { font-size: 12px; color: var(--muted); }
.movie-card .badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

/* Ad slot */
.ad-slot { margin-top: 14px; min-height: 90px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 14px; }

/* Player & comments */
.player-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.episode-select { margin: 10px 0; max-width: 260px; }
.link-picker { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 12px; }
.link-picker button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.012);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px);
}
.link-picker button.is-active { background:var(--primary); color:#052e16; border-color:#064e3b; }
.comment-box { margin-top: 14px; border: 1px solid var(--border); border-radius: 16px; padding: 12px; background: var(--surface); }

/* Watch page */
.watch-page { margin-top: 12px; }
.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
  grid-template-areas: "watch-main watch-aside";
}
@media (max-width: 1220px) {
  .watch-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "watch-main" "watch-aside";
  }
  .watch-aside .card {
    position: static;
    top: auto;
  }
}
.watch-main { grid-area: watch-main; display: flex; flex-direction: column; gap: 18px; }
.watch-aside { grid-area: watch-aside; align-self: flex-start; }
.watch-aside .card {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  width: 100%;
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px);
}
.watch-aside .card:last-child { margin-bottom: 0; }
.watch-links { width: 100%; align-self: stretch; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 10px; font-size: 13px; }
.breadcrumbs a { color: var(--text); }
.watch-hero {
  padding: 0;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px);
}
.watch-hero.is-zoom {
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.25);
}
.watch-page.is-zoom .watch-hero {
  position: relative;
  width: min(1400px, calc(100vw - 48px));
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 0;
  overflow: visible;
  transform: none;
}
.watch-page .card:not(.watch-hero) {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 60px rgba(5, 8, 18, 0.5);
  backdrop-filter: blur(34px);
}
.player-shell { position: relative; aspect-ratio: 16 / 9; background: #000; transition: transform .2s ease; min-height: 50vh; max-width: 100%; }
.player-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-zoom-btn{position:absolute;top:12px;right:12px;z-index:5;background:rgba(16,185,129,.92);color:#041b0f;border:1px solid #0ea5e9;border-radius:12px;padding:8px 12px;font-weight:800;cursor:pointer;box-shadow:0 6px 16px rgba(0,0,0,.35);display:inline-flex;align-items:center;gap:6px;}
.player-zoom-btn:hover,.player-zoom-btn:focus-visible{border-color:#22d3ee;color:#031107;transform:translateY(-1px);}
.player-zoom-icon{font-size:18px;line-height:1;}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0;}
.player-shell.is-zoom{position:relative;z-index:3;width:min(1400px,calc(100vw - 48px));max-width:100%;margin:0 auto 18px;height:auto;aspect-ratio:16/9;min-height:0;background:#000;border-radius:18px;overflow:hidden;box-shadow:0 32px 80px rgba(0,0,0,0.65);border:1px solid rgba(255,255,255,0.12);transform:scale(1.03);}
.player-shell.is-zoom iframe{position:absolute;inset:0;width:100%;height:100%;}
.watch-links .section-title,
.watch-links .muted{padding-left:8px;padding-right:8px;}
.watch-info,
.watch-links,
.watch-episodes,
.watch-report,
.watch-comments,
.hotlist,
.card,
.watch-grid > .card {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(32px);
}
.watch-page.is-zoom .watch-grid {
  grid-template-columns: 1fr;
  grid-template-areas:
    "watch-main"
    "watch-aside";
  gap: 24px;
}
.watch-page.is-zoom .watch-aside {
  align-self: stretch;
  margin-top: 12px;
}
.watch-page.is-zoom .watch-aside .card {
  position: static;
  top: auto;
}
.watch-links,
.watch-episodes,
.watch-comments,
.hotlist { margin-top: 16px; }

.watch-comments {
  padding: 16px;
}
.watch-comments .comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin: 0;
}
.comment-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}
.watch-comments .comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px);
}
.user-greeting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.user-greeting h3 {
  margin: 0;
}
.user-vip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
}
.vip-pill.vip-pill--inactive {
  border-color: rgba(148, 163, 184, 0.65);
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}
.vip-remaining {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.history-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.85rem;
}
.history-status {
  color: var(--muted);
  font-size: 0.8rem;
}
.watch-history-page {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.watch-history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.watch-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.watch-history-card {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
.watch-history-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.watch-history-episodes {
  margin-top: 14px;
  display: none;
  flex-direction: column;
  gap: 12px;
}
.watch-history-episodes.is-open {
  display: flex;
}
.watch-history-episode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.watch-history-episode:last-child {
  border-bottom: none;
}
.watch-history-episode__title {
  font-size: 0.95rem;
}
.watch-history-episode__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  font-size: 0.85rem;
}
.watch-history-notice {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #7dd3fc;
}
.watch-history-episode__status {
  font-size: 0.85rem;
  color: var(--muted);
}
.watch-comments .comment-form .input {
  background: rgba(15, 23, 42, 0.015);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(32px);
}
.watch-report .input {
  background: rgba(15, 23, 42, 0.015);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(32px);
}

.chip-row.alt{padding:0 8px;}
.watch-topbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  align-items: center;
  flex-wrap: nowrap;
}

.watch-links,
.watch-report,
.watch-comments,
.watch-hero {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px);
}
.watch-topbar__left { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; flex: 0 0 auto; }
.watch-topbar__center { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: center; flex-wrap: nowrap; }
.watch-topbar__right { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.watch-topbar .btn { padding: 6px 10px; font-size: 12px; }
.watch-topbar .input { height: 32px; padding: 6px 10px; }
.watch-topbar__right .muted { margin: 0; white-space: nowrap; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.watch-hero__bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.015);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px);
}
.watch-hero__panel {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  flex-wrap: nowrap;
}
.watch-poster { flex: 0 0 100px; }
.watch-hero__info { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.watch-description { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; max-height: 72px; overflow: hidden; }
.watch-title { font-size: 20px; font-weight: 800; }
.watch-meta { gap: 10px; }
.watch-hero__info .watch-meta span { color: rgba(226, 232, 240, 0.7); }
.watch-hero__panel .watch-poster img { height: auto; }
.watch-hero__panel img { max-width: 100%; }
@media (max-width: 900px) {
  .watch-hero__panel { flex-direction: column; }
  .watch-poster { width: 100%; flex: none; }
  .watch-hero__info { gap: 10px; }
}
.watch-rating {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:8px;
  font-size:14px;
  flex-wrap:wrap;
}
.watch-rating__stars { display:flex; gap:6px; }
.watch-rating__star {
  background:none;
  border:none;
  color: rgba(148,163,184,.7);
  font-size:20px;
  cursor:pointer;
  padding:0;
  line-height:1;
  transition: color .2s ease, transform .2s ease;
}
.watch-rating__star.is-active { color: #fbbf24; transform: translateY(-1px); text-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
.watch-rating__star:focus-visible { outline: 2px solid var(--primary); border-radius: 4px; }
.watch-rating__value { display:flex; align-items:center; gap:6px; font-size:13px; }
.watch-rating__value strong { font-size:14px; font-weight:700; color: var(--text); }
.watch-rating__hint { font-size:12px; color: var(--muted); margin-left: auto; }
.watch-rating--compact { gap:10px; margin-top:4px; }
.watch-rating--compact .watch-rating__stars { pointer-events:none; }
.watch-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.watch-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.watch-actions form { margin: 0; }
.watch-actions .btn {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color: var(--text);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
}
.watch-actions .btn.ghost {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(15, 23, 42, 0.95);
}
.watch-actions .btn.is-liked {
  background: rgba(16, 185, 129, 0.65);
  border-color: rgba(16, 185, 129, 0.95);
  color: #ecfdf5;
  opacity: 0.95;
}
.watch-actions .btn.is-saved {
  background: rgba(249, 115, 22, 0.65);
  border-color: rgba(249, 115, 22, 0.95);
  color: #1b1b1b;
  opacity: 0.95;
}
.watch-actions--topbar {
  gap: 10px;
  margin-left: 8px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}
.watch-actions--topbar form {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin: 0;
}
.watch-links-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.watch-banner { padding: 12px; margin: 12px 0; text-align: center; }
.watch-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row.alt { gap: 6px; }
.chip,
.episode-pill {
  transition: background .3s ease, border .3s ease, color .3s ease;
  background: rgba(15, 23, 42, 0.012);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(28px);
  font-weight: 700;
  font-size: 13px;
}

.chip.is-active,
.episode-pill.is-active {
  background: var(--link-active);
  border-color: var(--link-active);
  color: #031107;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.episode-pill {
  display: grid;
  place-items: center;
  padding: 10px 0;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px);
  font-weight: 700;
}

.episode-pill.ghost {
  background: rgba(15, 23, 42, 0.015);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.episode-pill.ghost.is-active {
  background: var(--link-active);
  border-color: var(--link-active);
  color: #031107;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.watch-info { padding: 14px; }
.watch-summary { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: start; }
@media (max-width: 640px) { .watch-summary { grid-template-columns: 1fr; } }
.watch-thumb { width: 100%; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.watch-episodes { padding: 14px; }
.server-block {
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px);
}
.server-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px,1fr)); gap: 10px; }
.reply-list { display: none; gap: 10px; margin-top: 6px; }
.reply-list.is-open { display: grid; gap: 10px; margin-top: 6px; }
.comment-reply {
  margin-left: 14px;
  padding: 10px 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.012);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(26px);
}
.comment-reply-form {
  display: none;
  margin-top: 10px;
  margin-left: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.013);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(28px);
}
.comment-reply-form.is-open {
  display: block;
}
.comment-reply-form .input {
  background: rgba(15, 23, 42, 0.012);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(22px);
  color: var(--text);
  border-radius: 12px;
}
.comment-meta-row { display:flex; align-items:center; gap:10px; margin-top:8px; color:var(--muted); font-size:12px; }
.comment-meta-row .meta-actions { margin-left:auto; display:flex; gap:10px; align-items:center; }
.comment-meta-row .comment-time { letter-spacing: .1px; }
.comment-meta-row .reply-link { font-size: 12px; margin: 0; padding: 0; background: transparent; border: none; color: var(--primary); cursor: pointer; }
.comment-meta-row .reply-link:hover, .comment-meta-row .reply-link:focus-visible { text-decoration: underline; }
.reply-link { background: transparent; border: none; padding: 0; color: var(--primary); font-weight: 700; cursor: pointer; }
.reply-link:hover, .reply-link:focus-visible { text-decoration: underline; outline: none; }
.reply-toggle { background: transparent; border: none; padding: 0; color: var(--primary); font-weight: 500; cursor: pointer; font-size: 12px; }
.reply-toggle:hover, .reply-toggle:focus-visible { text-decoration: underline; }
.watch-aside .card { padding: 12px; }
.watch-report { padding: 14px; }
.btn.is-liked { background: var(--accent); color: #041f2a; border: 1px solid #0ea5e9; }
.btn.is-saved { background: #f59e0b; color: #3b2400; border: 1px solid #d97706; }

/* Footer */
.site-footer { margin-top: 40px; padding: 28px 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.theme-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); padding: 10px 12px; box-shadow: var(--shadow); }

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

.full-page-ad {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(8, 8, 12, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}
.full-page-ad.is-visible {
  display: flex;
}
.full-page-ad__content {
  width: min(960px, 90vw);
  max-height: 80vh;
  overflow: auto;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}
.full-page-ad__close {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
body.full-page-ad-open {
  overflow: hidden;
}

/* Hotlist component base styles (container) if CSS wasn't loaded inline */
.hotlist {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  padding: 12px;
  backdrop-filter: blur(30px);
}

/* Layout overrides to keep content aligned with header */
.header-inner,
.container {
  width: 90vw;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.watch-history-expand {
  border: none;
  background: rgba(59, 130, 246, 0.12);
  color: #7dd3fc;
  font-weight: 600;
}
