:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #10b981;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(16, 185, 129, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(20, 184, 166, 0.18), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: white;
  box-shadow: 0 10px 34px rgba(16, 185, 129, 0.28);
  font-weight: 900;
}

.logo-text {
  display: grid;
  line-height: 1.08;
}

.logo-title {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #6ee7b7, #2dd4bf);
  -webkit-background-clip: text;
  color: transparent;
}

.logo-subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  transition: 0.22s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
  background: rgba(16, 185, 129, 0.16);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  font-size: 20px;
}

main {
  padding-top: 68px;
}

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

.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32), rgba(20, 184, 166, 0.22));
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(1.08) contrast(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.70) 48%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.30) 0%, rgba(2, 6, 23, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: end;
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  padding: 7px 12px;
  border: 1px solid rgba(45, 212, 191, 0.30);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #99f6e4;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 18px;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 760px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.78;
}

.meta-row,
.tag-row,
.hero-actions,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.badge,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.badge {
  padding: 8px 11px;
  color: #bbf7d0;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.12);
}

.tag {
  padding: 7px 10px;
  color: #cbd5e1;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.70);
}

.meta-pill {
  padding: 7px 10px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.10);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.28);
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.50);
  backdrop-filter: blur(10px);
}

.hero-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(20, 184, 166, 0.08));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 34px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--emerald), var(--teal));
}

.section {
  padding: 58px 0;
}

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

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

.section-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card,
.category-card,
.rank-card,
.info-card,
.search-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.18);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.38);
  background: rgba(15, 23, 42, 0.86);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 20% 18%, rgba(16, 185, 129, 0.30), transparent 42%),
    linear-gradient(135deg, #0f172a, #111827 50%, #134e4a);
}

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

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

.poster-title {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 0;
  color: rgba(226, 232, 240, 0.18);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.card-line {
  margin: 9px 0 0;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-meta {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 12px;
}

.category-card {
  padding: 22px;
  min-height: 178px;
  display: grid;
  align-content: space-between;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.44);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-card {
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-num {
  font-size: 28px;
  font-weight: 950;
  color: #34d399;
  text-align: center;
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(20, 184, 166, 0.10));
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-card h3 {
  margin: 0;
  font-size: 18px;
}

.rank-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-hero {
  padding: 68px 0 34px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 185, 129, 0.20), transparent 32rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.36));
}

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

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 17px;
}

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

.breadcrumb a {
  color: #99f6e4;
}

.search-panel {
  padding: 18px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, 180px);
  gap: 12px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.58);
  color: white;
  font: inherit;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  padding: 32px 0 56px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: black;
  box-shadow: var(--shadow);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.26), transparent 18rem),
    rgba(2, 6, 23, 0.35);
  cursor: pointer;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 34px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 54px rgba(16, 185, 129, 0.35);
}

.info-card {
  padding: 22px;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 12px;
}

.info-card p {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.85;
}

.side-cover {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(20, 184, 166, 0.10));
}

.side-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-list {
  columns: 4 220px;
  column-gap: 28px;
}

.library-list a {
  display: block;
  break-inside: avoid;
  padding: 9px 0;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.library-list a:hover {
  color: #99f6e4;
}

.site-footer {
  margin-top: 58px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.55);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #cbd5e1;
}

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

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

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

  .hero-panel {
    max-width: 340px;
  }

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

@media (max-width: 760px) {
  .nav-shell {
    width: min(100% - 24px, 1180px);
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
  }

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

  .nav-links a {
    border-radius: 12px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    padding: 96px 0 82px;
  }

  .hero h1 {
    letter-spacing: -0.045em;
  }

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

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

  .rank-card {
    grid-template-columns: 46px 58px minmax(0, 1fr);
  }

  .rank-card .btn {
    grid-column: 2 / 4;
  }

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

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