:root {
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: #111827;
  --line: rgba(75, 85, 99, 0.55);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.16);
  --blue-soft: rgba(59, 130, 246, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(16, 185, 129, 0.18), transparent 30%),
    radial-gradient(circle at 80% 4%, rgba(59, 130, 246, 0.16), transparent 30%),
    var(--bg);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(31, 41, 55, 0.7);
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 7, 18, 0.9);
  border-bottom: 1px solid rgba(31, 41, 55, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #34d399;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #03251a;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.36);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #d1d5db;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  border: 0;
  color: #d1d5db;
  background: rgba(31, 41, 55, 0.9);
  border-radius: 10px;
  padding: 8px 10px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.72) 42%, rgba(3, 7, 18, 0.22)),
    linear-gradient(0deg, #030712, rgba(3, 7, 18, 0.16) 46%, rgba(3, 7, 18, 0.7));
}

.hero-content {
  position: relative;
  max-width: 760px;
  margin: 0 calc((100vw - min(1280px, 100vw)) / 2 + 24px) 112px;
}

.eyebrow {
  margin: 0 0 12px;
  display: inline-flex;
  color: #34d399;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-feature-title {
  color: #bbf7d0;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.card-tags,
.detail-badges,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span,
.detail-badges span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(52, 211, 153, 0.36);
  border-radius: 999px;
  padding: 5px 10px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.13);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.side-search button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.side-search button,
.hero-search button {
  color: white;
  background: #059669;
}

.primary-btn:hover,
.side-search button:hover,
.hero-search button:hover {
  background: #10b981;
  transform: translateY(-2px);
}

.ghost-btn {
  color: #d1d5db;
  background: rgba(17, 24, 39, 0.62);
  border-color: rgba(156, 163, 175, 0.3);
}

.ghost-btn:hover {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.56);
  transform: translateY(-2px);
}

.full-btn {
  width: 100%;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  width: min(760px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(75, 85, 99, 0.7);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(18px);
}

.hero-search input,
.side-search input,
.movie-filter input,
.movie-filter select {
  width: 100%;
  border: 1px solid rgba(75, 85, 99, 0.8);
  border-radius: 12px;
  outline: none;
  color: white;
  background: rgba(3, 7, 18, 0.65);
  padding: 12px 14px;
}

.hero-search input:focus,
.side-search input:focus,
.movie-filter input:focus,
.movie-filter select:focus {
  border-color: rgba(52, 211, 153, 0.78);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.hero-dots {
  position: absolute;
  right: calc((100vw - min(1280px, 100vw)) / 2 + 24px);
  bottom: 118px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #34d399;
}

.content-section,
.page-shell,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

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

.section-head.compact {
  margin-bottom: 20px;
}

.section-head h2,
.page-hero h1,
.detail-article h1,
.detail-article h2,
.spotlight-panel h2 {
  margin: 0;
  color: white;
  letter-spacing: -0.04em;
}

.section-head h2,
.page-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.page-grid {
  margin-top: 28px;
}

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

.poster-link img {
  transition: transform 0.45s ease, filter 0.45s ease;
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.78), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(8px);
  border-radius: 999px;
  padding: 8px 12px;
  color: white;
  background: #059669;
  font-size: 13px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.movie-card:hover .poster-glow,
.movie-card:hover .play-pill {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding-top: 14px;
}

.card-body h2 {
  margin: 8px 0;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.text-link:hover,
.ranking-item h2 a:hover,
.detail-meta a:hover {
  color: #34d399;
}

.card-body p {
  min-height: 54px;
  margin: 0 0 12px;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9ca3af;
  font-size: 13px;
}

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

.channel-card a,
.category-overview-card a,
.spotlight-panel,
.page-hero,
.detail-side,
.detail-article,
.player-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.88), rgba(3, 7, 18, 0.68));
  box-shadow: var(--shadow);
}

.channel-card a {
  position: relative;
  display: block;
  min-height: 250px;
  overflow: hidden;
}

.channel-card img {
  position: absolute;
  inset: 0;
  filter: saturate(1.08);
  transition: transform 0.45s ease;
}

.channel-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.9), rgba(3, 7, 18, 0.18));
}

.channel-card div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

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

.channel-card p,
.category-overview-card p,
.page-hero p,
.spotlight-panel p,
.detail-article p {
  color: var(--muted);
  line-height: 1.8;
}

.channel-card:hover img {
  transform: scale(1.08);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 56px 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 18px;
  padding: 12px;
  background: rgba(17, 24, 39, 0.7);
}

.rank-num {
  color: #34d399;
  font-size: 24px;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
}

.ranking-item h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ranking-item p {
  margin: 0 0 8px;
  color: #9ca3af;
  line-height: 1.6;
}

.spotlight-panel {
  padding: 26px;
}

.side-search {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.page-hero {
  padding: 44px;
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(17, 24, 39, 0.92), rgba(3, 7, 18, 0.75));
}

.small-hero,
.search-hero,
.ranking-hero,
.category-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-overview-card a {
  display: block;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.48);
}

.mini-covers {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 16px;
}

.movie-filter {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.7fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.7);
}

.movie-filter label {
  display: grid;
  gap: 8px;
  color: #d1d5db;
  font-size: 13px;
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
  display: none;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

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

.player-panel {
  padding: 14px;
}

.watch-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.watch-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-control {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.play-control span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 6px;
  color: white;
  background: #059669;
  box-shadow: 0 0 44px rgba(16, 185, 129, 0.55);
  font-size: 34px;
}

.play-control.is-playing {
  opacity: 0;
  pointer-events: none;
}

.detail-article {
  margin-top: 22px;
  padding: 30px;
}

.detail-badges {
  margin-bottom: 16px;
}

.detail-article h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-article h2 {
  margin-top: 30px;
  font-size: 24px;
}

.lead-text {
  color: #d1d5db !important;
  font-size: 18px;
}

.tag-cloud {
  margin-top: 24px;
}

.detail-side {
  position: sticky;
  top: 86px;
  align-self: start;
  padding: 18px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 16px;
}

.detail-meta {
  margin: 20px 0;
  display: grid;
  gap: 12px;
}

.detail-meta div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(75, 85, 99, 0.5);
  padding-bottom: 10px;
}

.detail-meta dt {
  color: #9ca3af;
}

.detail-meta dd {
  margin: 0;
  color: #f9fafb;
  text-align: right;
}

.related-section {
  grid-column: 1 / -1;
  padding-left: 0;
  padding-right: 0;
}

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

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 50px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(31, 41, 55, 0.92);
  background: rgba(3, 7, 18, 0.9);
}

.footer-brand p {
  max-width: 520px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-logo {
  margin-bottom: 18px;
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #9ca3af;
}

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

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(31, 41, 55, 0.92);
  padding: 20px 24px;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .split-section,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(3, 7, 18, 0.96);
  }

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

  .hero-content {
    margin: 0 20px 132px;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 160px;
  }

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

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

  .movie-filter {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .content-section,
  .page-shell,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .ranking-item {
    grid-template-columns: 44px 64px minmax(0, 1fr);
  }

  .page-hero,
  .detail-article {
    padding: 24px;
  }
}
