:root {
  --teal-900: #0f3f43;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --white: #ffffff;
  --shadow-soft: 0 24px 70px rgba(15, 23, 42, 0.16);
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, #eef8f8 0%, #ffffff 36%, #f8fafc 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-800), var(--cyan-600));
  box-shadow: 0 12px 35px rgba(8, 145, 178, 0.25);
}

.header-inner {
  width: min(100% - 32px, var(--max-width));
  min-height: 68px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: inline-grid;
  place-items: center;
  color: var(--teal-900);
  background: linear-gradient(135deg, var(--amber-400), #fff7ad);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  margin-top: 4px;
  color: #ccfbf1;
  font-size: 12px;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 22px 0;
  opacity: 0.92;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 3px;
  border-radius: 999px;
  background: var(--amber-400);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fde68a;
  opacity: 1;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--white);
  background: transparent;
}

.header-search input::placeholder {
  color: #ccfbf1;
}

.header-search button {
  border: 0;
  padding: 10px 16px;
  color: var(--white);
  cursor: pointer;
  background: var(--amber-500);
  transition: background 0.2s ease;
}

.header-search button:hover {
  background: #d97706;
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  padding: 8px 12px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-stage {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 120px max(24px, calc((100vw - var(--max-width)) / 2)) 78px;
  opacity: 0;
  visibility: hidden;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 118, 110, 0.55) 46%, rgba(2, 6, 23, 0.26) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 30%, rgba(251, 191, 36, 0.24), transparent 30%), linear-gradient(180deg, transparent 55%, rgba(2, 6, 23, 0.72));
  pointer-events: none;
}

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

.hero-content {
  position: relative;
  width: min(680px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero-content h1 {
  font-size: clamp(42px, 6vw, 76px);
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  max-width: 620px;
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.mini-tags span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 6px 12px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-action {
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-700), var(--cyan-500));
  box-shadow: 0 14px 28px rgba(6, 182, 212, 0.32);
}

.secondary-action {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 58px;
  background: var(--amber-400);
}

.main-section {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 58px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--gray-500);
  line-height: 1.8;
}

.section-head a {
  display: inline-flex;
  min-width: max-content;
  color: var(--teal-700);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px;
}

.feature-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.08);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-800), var(--cyan-600));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.72));
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
}

.year-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 11px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
  font-size: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber-500), #ef4444);
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.34);
}

.movie-card-body {
  padding: 17px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--teal-700);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 8px 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover {
  color: var(--teal-700);
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.7;
}

.mini-tags span {
  border-color: rgba(15, 118, 110, 0.16);
  color: var(--teal-700);
  background: #ecfeff;
  font-size: 12px;
  padding: 4px 9px;
}

.accent-panel {
  width: min(100% - 32px, calc(var(--max-width) + 34px));
  border-radius: var(--radius-xl);
  padding: 42px 24px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(6, 182, 212, 0.08));
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.large-category-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.category-card {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  color: var(--white);
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.86)), var(--category-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card span {
  color: #fde68a;
  font-weight: 900;
}

.category-card strong {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.2;
}

.category-card p {
  margin: 10px 0 0;
  color: #e2e8f0;
  line-height: 1.7;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.wide-rank-list {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.compact-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 160px;
}

.compact-card .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

.compact-card .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.filter-input {
  flex: 1 1 260px;
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  outline: 0;
  padding: 0 18px;
  background: var(--gray-50);
}

.filter-input:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--teal-800);
  background: #ccfbf1;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: var(--white);
  background: var(--teal-700);
}

.empty-state {
  margin: 22px 0 0;
  border-radius: var(--radius-md);
  padding: 18px;
  color: var(--gray-500);
  background: var(--gray-100);
  text-align: center;
  font-weight: 700;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-900), var(--cyan-600));
}

.page-hero > div {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 86px 0 74px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.page-hero p {
  max-width: 760px;
  color: #d9f99d;
  font-size: 18px;
  line-height: 1.8;
}

.channel-hero {
  background: radial-gradient(circle at 14% 15%, rgba(251, 191, 36, 0.25), transparent 28%), linear-gradient(135deg, var(--teal-900), var(--cyan-600));
}

.detail-hero {
  position: relative;
  color: var(--white);
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 118, 110, 0.62), rgba(2, 6, 23, 0.76)), var(--backdrop-image);
  background-size: cover;
  background-position: center;
}

.detail-layout {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 64px 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
  background: linear-gradient(135deg, var(--teal-800), var(--cyan-600));
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cffafe;
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fde68a;
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.detail-one-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 13px;
  color: #111827;
  background: #fef3c7;
  font-weight: 900;
}

.watch-section {
  width: min(100% - 32px, var(--max-width));
  margin: 46px auto 0;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--slate-950);
  box-shadow: var(--shadow-soft);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.56));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: var(--teal-900);
  background: linear-gradient(135deg, var(--amber-400), #ffffff);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.36);
  font-size: 36px;
}

.play-overlay span:last-child {
  font-size: 22px;
  font-weight: 900;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  border: 1px solid rgba(15, 118, 110, 0.09);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--white);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.story-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 26px;
  font-weight: 900;
}

.story-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 2;
}

.compact-story {
  grid-column: 1 / -1;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 0;
}

.info-list div {
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--gray-50);
}

.info-list dt {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 6px 0 0;
  color: var(--slate-900);
  font-weight: 900;
}

.more-tags {
  margin-top: 18px;
}

.more-tags span {
  border-color: rgba(15, 118, 110, 0.16);
  color: var(--teal-700);
  background: #ecfeff;
}

.related-section {
  padding-top: 12px;
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 50px 0 34px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  max-width: 390px;
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.site-footer a:hover {
  color: var(--cyan-500);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 12px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 0;
  }

  .main-nav a::after {
    bottom: 5px;
  }

  .header-search {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 12px;
  }

  .header-search input {
    width: 100%;
    flex: 1;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(280px, 80vw);
  }

  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-slide {
    min-height: 78vh;
    padding: 104px 18px 72px;
  }

  .hero-stage,
  .hero-carousel {
    min-height: 78vh;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .movie-grid,
  .rank-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 120px 1fr;
  }

  .page-hero > div {
    padding: 58px 0;
  }

  .main-section {
    padding: 42px 0;
  }

  .watch-section {
    width: min(100% - 20px, var(--max-width));
  }
}
