:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.18);
  --gold: #facc15;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(16, 185, 129, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 0%, rgba(14, 165, 233, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

.navbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #22d3ee);
  color: #001313;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.1);
}

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

.nav-links a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--accent);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 0 18px;
}

.mobile-panel a {
  display: block;
  margin: 5px 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.52);
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide img {
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.68) 43%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 96px 0 76px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border: 1px solid rgba(16, 185, 129, 0.36);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 7vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #022c22;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.24);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: white;
  font-size: 28px;
  backdrop-filter: blur(12px);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--accent);
}

main {
  min-height: 64vh;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.35);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-title {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

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

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

.movie-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.56);
  box-shadow: 0 22px 70px rgba(16, 185, 129, 0.12);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 70%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-chip {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  color: #022c22;
  font-size: 22px;
  font-weight: 900;
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: #022c22;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(250, 204, 21, 0.94);
  color: #422006;
}

.movie-body {
  padding: 16px;
}

.movie-title {
  margin: 0 0 9px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.38;
}

.movie-card:hover .movie-title {
  color: #6ee7b7;
}

.movie-desc {
  min-height: 48px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta span,
.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.82);
  color: #cbd5e1;
  font-size: 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #0f172a;
}

.feature-card img {
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.feature-copy {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding: 22px;
}

.feature-copy h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.feature-copy p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

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

.category-card {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(6, 78, 59, 0.42));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.55);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.page-hero {
  padding: 78px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.14), transparent 44%),
    rgba(15, 23, 42, 0.28);
}

.page-hero h1 {
  max-width: 980px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.68);
  color: var(--text);
  padding: 0 14px;
}

.filter-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #022c22;
  font-weight: 900;
  padding: 0 18px;
}

.empty-state {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 70px 150px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.52);
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: rgba(250, 204, 21, 0.16);
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.ranking-row img {
  height: 84px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-row h2,
.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 58vh;
  border-bottom: 1px solid var(--line);
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.08);
  transform: scale(1.04);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78) 55%, rgba(2, 6, 23, 0.36)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 50%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  align-items: end;
  padding: 78px 0 54px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.75;
}

.player-section {
  padding-top: 44px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: black;
  box-shadow: var(--shadow);
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  color: white;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
  display: inline-grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.96);
  color: #022c22;
  font-size: 34px;
  box-shadow: 0 16px 38px rgba(16, 185, 129, 0.32);
}

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

.content-panel + .content-panel {
  margin-top: 18px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.92;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-grid p,
.footer-grid a {
  color: #94a3b8;
  line-height: 1.8;
  font-size: 14px;
}

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

.copyright {
  padding: 18px 0 32px;
  color: #64748b;
  font-size: 13px;
}

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

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

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

@media (max-width: 760px) {
  .navbar {
    height: 62px;
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .hero-slider,
  .hero-slide img,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding: 88px 0 72px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 50px 0;
  }

  .section-head {
    display: block;
  }

  .section-actions {
    margin-top: 18px;
  }

  .movie-grid,
  .movie-grid.compact,
  .feature-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 52px 96px 1fr;
  }

  .ranking-row .btn {
    grid-column: 1 / -1;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding-top: 58px;
  }

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

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