* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #ffffff;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(6, 182, 212, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.95));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
  font-size: 14px;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-weight: 700;
  padding: 24px 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  transition: right 0.25s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  right: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 999px;
}

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

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

.mobile-nav-link {
  padding: 12px;
  color: #cbd5e1;
  border-radius: 12px;
}

.mobile-nav-link:hover {
  color: var(--cyan);
  background: rgba(30, 41, 59, 0.82);
}

main {
  padding-top: 68px;
}

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

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.42) 72%, rgba(2, 6, 23, 0.84) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 40px;
  padding: 72px 0 80px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 780px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  color: var(--white);
  letter-spacing: -0.06em;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 30px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.68);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 12px 34px rgba(6, 182, 212, 0.28);
}

.btn-secondary {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  padding: 16px;
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
}

.hero-card h2 {
  margin: 16px 4px 6px;
  color: var(--white);
  font-size: 24px;
}

.hero-card p {
  margin: 0 4px 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  padding: 0;
}

.hero-dot.active,
.hero-arrow:hover,
.hero-dot:hover {
  background: var(--cyan-strong);
  transform: scale(1.08);
}

.section {
  padding: 72px 0 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

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

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

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

.category-card {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 58%),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card h2 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.category-card span {
  margin-top: 18px;
  color: var(--cyan);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.search-label {
  color: var(--white);
  font-weight: 800;
}

.search-input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.7);
  outline: none;
  font-size: 16px;
}

.search-input:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 0 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
  font-weight: 800;
}

.filter-pill.is-active,
.filter-pill:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  border-color: transparent;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  font-size: 20px;
  font-weight: 900;
}

.rank-cover img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 20px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0;
  background: #020617;
}

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

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-info p {
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  font-weight: 800;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.18), transparent 22rem),
    rgba(2, 6, 23, 0.36);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 18px 46px rgba(6, 182, 212, 0.34);
  font-weight: 900;
}

.detail-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.text-panel {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
}

.text-panel h2 {
  margin: 0;
  color: var(--white);
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.empty-message {
  display: none;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.76);
}

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

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

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-grid h2 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: 18px;
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

  .hero-card {
    display: none;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    min-height: 720px;
    padding: 54px 0 92px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-controls {
    bottom: 22px;
  }

  .section {
    padding-top: 52px;
  }

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

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

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

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

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

  .rank-num {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .rank-cover img {
    width: 72px;
  }

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

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

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

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .card-body h2 {
    font-size: 20px;
  }
}
