:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #0f172a;
  --line: rgba(34, 211, 238, 0.18);
  --line-strong: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.28);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.22), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(59, 130, 246, 0.22), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.nav-action,
.hero-cta,
.button-primary,
.button-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-action,
.button-primary {
  padding: 11px 18px;
  color: #00111b;
  background: linear-gradient(135deg, var(--cyan), #93c5fd);
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.26);
}

.button-soft {
  padding: 11px 18px;
  color: #dffbff;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.72);
}

.nav-action:hover,
.hero-cta:hover,
.button-primary:hover,
.button-soft:hover {
  transform: translateY(-2px);
}

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

.mobile-menu {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--soft);
}

.mobile-menu a:hover {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

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

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  padding: 70px 0 46px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 38px -28px 0;
  border-radius: 40px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.58);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.38);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h1 span,
.page-hero h1 span {
  background: linear-gradient(135deg, #67e8f9, #bfdbfe, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead,
.page-lead,
.detail-lead {
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}

.hero-cta {
  padding: 14px 22px;
  color: #00111b;
  background: linear-gradient(135deg, #22d3ee, #93c5fd);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.25);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 590px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.55);
}

.hero-search input,
.search-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 14px;
  color: #fff;
  outline: none;
  background: rgba(15, 23, 42, 0.86);
}

.hero-search input:focus,
.search-input:focus,
.filter-select:focus {
  border-color: var(--line-strong);
}

.hero-visual {
  position: relative;
  min-height: 500px;
}

.hero-slider {
  position: relative;
  height: 500px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.36) 42%, rgba(2, 6, 23, 0.94) 100%);
}

.hero-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-caption h2 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-caption p {
  margin: 0 0 18px;
  color: var(--soft);
  line-height: 1.7;
}

.hero-badges,
.tag-list,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span,
.tag-list span,
.meta-pills span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.76);
  font-size: 12px;
}

.slider-dots {
  position: absolute;
  z-index: 3;
  left: 24px;
  top: 24px;
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.slider-dots button.active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.floating-rank {
  position: absolute;
  right: -10px;
  bottom: -26px;
  width: min(320px, 88%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.floating-rank strong {
  display: block;
  margin-bottom: 12px;
  color: #a5f3fc;
}

.floating-rank a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  color: var(--soft);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.section {
  margin: 64px 0;
}

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

.section-head h2,
.page-hero h1,
.player-section h2,
.detail-copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: #67e8f9;
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card,
.category-tile,
.rank-item,
.detail-panel,
.player-section,
.search-panel {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.22);
}

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

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

.play-chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  color: #00111b;
  background: linear-gradient(135deg, var(--cyan), #bfdbfe);
  font-size: 13px;
  font-weight: 900;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.movie-card:hover .play-chip {
  transform: translateY(0);
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.card-meta {
  margin-bottom: 8px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
}

.card-body h2,
.category-tile h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.card-body p,
.category-tile p,
.rank-text p,
.detail-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

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

.category-tile {
  padding: 20px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.26), rgba(59, 130, 246, 0.24));
}

.page-hero {
  margin: 44px 0 34px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.13), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.filter-bar,
.search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 24px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  background: rgba(34, 211, 238, 0.14);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 160px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #00111b;
  background: linear-gradient(135deg, var(--cyan), #bfdbfe);
  font-size: 24px;
  font-weight: 900;
}

.rank-item img {
  width: 160px;
  height: 92px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-text h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-heat {
  color: #fef3c7;
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 30px;
  align-items: center;
  margin: 46px 0 32px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.detail-title {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.player-section {
  margin: 30px 0;
  padding: 22px;
}

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

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

.player-tip {
  margin: 14px 0 0;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
  margin: 30px 0 64px;
}

.detail-copy,
.side-panel {
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
}

.detail-copy h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: rgba(34, 211, 238, 0.12);
}

.compact-card img {
  width: 92px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.search-panel {
  padding: 22px;
  margin-bottom: 24px;
}

.search-controls {
  margin: 0;
}

.search-input {
  flex: 1 1 320px;
}

.filter-select {
  flex: 0 1 180px;
}

.search-results {
  display: grid;
  gap: 16px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.search-result-card img {
  width: 180px;
  height: 104px;
  object-fit: cover;
  border-radius: 16px;
}

.search-result-card h2 {
  margin: 0 0 8px;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

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

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

.footer-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.footer-grid a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.footer-grid a:hover {
  color: #67e8f9;
}

@media (max-width: 1000px) {
  .main-nav,
  .nav-action {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  body.menu-open .mobile-menu {
    display: block;
  }

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

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

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

  .rank-item {
    grid-template-columns: 58px 128px 1fr;
  }

  .rank-heat {
    grid-column: 2 / -1;
  }

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

@media (max-width: 640px) {
  .nav-shell,
  main,
  .footer-grid,
  .mobile-menu {
    width: min(100% - 22px, var(--max));
  }

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

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .hero::before {
    inset: 12px -10px 0;
    border-radius: 28px;
  }

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

  .hero-slider,
  .hero-visual {
    height: 420px;
    min-height: 420px;
  }

  .floating-rank {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 16px;
  }

  .section-head {
    display: block;
  }

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

  .page-hero {
    padding: 28px;
  }

  .rank-item,
  .search-result-card {
    grid-template-columns: 1fr;
  }

  .rank-item img,
  .search-result-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rank-heat {
    grid-column: auto;
  }
}
