:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --sky: #0284c7;
  --rose: #e11d48;
  --amber: #f59e0b;
  --purple: #7c3aed;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f8fafc;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.84);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--sky));
  box-shadow: 0 10px 26px rgba(5, 150, 105, 0.28);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  font-weight: 650;
  color: #374151;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--emerald);
}

.header-search {
  width: 260px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search:focus-within {
  background: #ffffff;
  border-color: rgba(5, 150, 105, 0.45);
}

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

.header-search button {
  border: 0;
  color: #ffffff;
  background: var(--emerald);
  padding: 10px 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #374151;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 14px 24px 22px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.mobile-nav a,
.mobile-nav input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
}

.mobile-nav a:hover {
  color: var(--emerald);
  background: #f0fdf4;
}

.mobile-nav input {
  border: 1px solid var(--line);
  outline: 0;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #030712;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.72s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1.1);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(5, 150, 105, 0.38), transparent 32%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.72) 44%, rgba(3, 7, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.82) 0%, rgba(3, 7, 18, 0.04) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  min-height: 660px;
  margin: 0 auto;
  padding: 96px 24px 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow span,
.eyebrow a,
.detail-channel a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
}

.eyebrow span,
.detail-channel a {
  background: var(--emerald);
  color: #ffffff;
}

.eyebrow a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero p {
  max-width: 700px;
  margin: 24px 0 0;
  color: #d1d5db;
  font-size: 20px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 650;
  color: #065f46;
  background: #d1fae5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

.primary-btn {
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  background: var(--emerald-dark);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.26);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.quick-search-panel {
  max-width: 1180px;
  margin: -42px auto 0;
  position: relative;
  z-index: 8;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.large-search {
  display: flex;
  gap: 12px;
}

.large-search input,
.inline-filter input,
.search-page-form input {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 999px;
  padding: 15px 20px;
  color: var(--ink);
  background: #ffffff;
}

.large-search input:focus,
.inline-filter input:focus,
.search-page-form input:focus {
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.large-search button,
.inline-filter button,
.search-page-form button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--emerald);
  font-weight: 800;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-weight: 700;
}

.content-section,
.page-wrap,
.detail-wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 64px 24px;
}

.no-top-pad {
  padding-top: 30px;
}

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

.section-kicker {
  color: var(--emerald);
  font-weight: 800;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
  color: var(--emerald);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(5, 150, 105, 0.38);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  height: 265px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #064e3b);
}

.movie-card-featured .poster-link {
  height: 300px;
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.score-badge,
.rank-no {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.score-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(5, 150, 105, 0.92);
}

.rank-no {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 17px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.3;
}

.card-body h3 a:hover {
  color: var(--emerald);
}

.card-body p {
  margin: 0 0 14px;
  min-height: 48px;
  color: #4b5563;
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.channel-grid,
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.channel-card {
  min-height: 172px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.channel-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.channel-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
}

.channel-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.channel-tone-0 { background: linear-gradient(135deg, #059669, #0d9488); }
.channel-tone-1 { background: linear-gradient(135deg, #0284c7, #2563eb); }
.channel-tone-2 { background: linear-gradient(135deg, #e11d48, #db2777); }
.channel-tone-3 { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.channel-tone-4 { background: linear-gradient(135deg, #7c3aed, #4f46e5); }

.page-hero {
  margin-top: 36px;
  padding: 58px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #047857, #0284c7 58%, #4f46e5);
  box-shadow: var(--shadow);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  font-weight: 900;
  color: #d1fae5;
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 60px);
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.channel-hero,
.search-hero {
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #0f766e, #0284c7);
}

.ranking-hero {
  background:
    radial-gradient(circle at 76% 16%, rgba(255, 255, 255, 0.3), transparent 30%),
    linear-gradient(135deg, #be123c, #7c3aed 58%, #1d4ed8);
}

.inline-filter,
.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 24px;
}

.category-overview-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: 26px;
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.86), rgba(3, 7, 18, 0.18));
}

.category-overview-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 22px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-overview-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.rank-list {
  margin-top: 38px;
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr minmax(220px, 420px) 58px;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(5, 150, 105, 0.42);
}

.rank-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  color: #ffffff;
  background: var(--ink);
  font-weight: 900;
}

.rank-row strong {
  font-size: 17px;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
}

.rank-row b {
  color: var(--emerald);
  text-align: right;
}

.search-summary {
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 26px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--emerald);
}

.detail-wrap {
  padding-top: 20px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 38px;
  align-items: center;
  padding: 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 84% 16%, rgba(5, 150, 105, 0.18), transparent 30%),
    #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #064e3b);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

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

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  margin: 18px 0 0;
  color: #374151;
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  margin-top: 34px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.28);
}

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

.play-button {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.4);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid #ffffff;
}

.video-shell.is-playing .play-button {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 34px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.detail-content h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  margin-top: 30px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #111827 55%, #064e3b);
}

.footer-grid {
  max-width: 1220px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 22px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  max-width: 460px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .channel-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 8px;
  }

  .hero,
  .hero-content {
    min-height: 600px;
  }

  .movie-grid,
  .featured-grid,
  .channel-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    max-width: 360px;
  }

  .rank-row {
    grid-template-columns: 42px 1fr 48px;
  }

  .rank-row em {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 17px;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 80px 18px 84px;
  }

  .hero p {
    font-size: 17px;
  }

  .large-search,
  .inline-filter,
  .search-page-form {
    flex-direction: column;
  }

  .large-search button,
  .inline-filter button,
  .search-page-form button {
    min-height: 48px;
  }

  .content-section,
  .page-wrap,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .featured-grid,
  .channel-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero {
    padding: 28px;
    border-radius: 24px;
  }

  .poster-link {
    height: 320px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
