:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #94a3b8;
  --faint: #64748b;
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --pink: #f472b6;
  --amber: #f59e0b;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.18), transparent 36rem),
    radial-gradient(circle at 88% 18%, rgba(244, 114, 182, 0.12), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.32);
  font-size: 15px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(34, 211, 238, 0.1);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px 0 16px;
}

.mobile-category-links a {
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.8);
}

.hero-slider {
  position: relative;
  min-height: 590px;
  height: 72vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-slide::before {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.86) 46%, rgba(15, 23, 42, 0.1));
}

.hero-slide::after {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 45%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 54px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

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

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

.button-primary,
.button-secondary,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.button-primary {
  color: #05101d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.28);
}

.button-secondary,
.section-more {
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.button-primary:hover,
.button-secondary:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.tag-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.65);
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 58px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  transition: all 0.22s ease;
}

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

.hero-dot {
  width: 38px;
  height: 6px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.active,
.hero-arrow:hover {
  border-color: rgba(34, 211, 238, 0.52);
  background: rgba(34, 211, 238, 0.22);
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.28);
}

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

.section-heading h2,
.page-hero h1,
.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p,
.category-card p,
.movie-card p,
.detail-title p,
.detail-content p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62));
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 24px 80px rgba(34, 211, 238, 0.13);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 14px;
  color: #03101c;
  background: linear-gradient(135deg, #fef3c7, var(--amber));
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  margin-bottom: 8px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 14px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list,
.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 {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18)),
    linear-gradient(135deg, rgba(34, 211, 238, 0.28), transparent 45%);
}

.category-card div {
  position: absolute;
  inset: auto 18px 18px;
}

.category-card span {
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 800;
}

.category-card h3 {
  margin: 6px 0 8px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.page-hero {
  padding: 86px 0 42px;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background:
    radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.22), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.hidden-card {
  display: none;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: auto 84px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-row strong {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

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

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  color: #fde68a;
  font-size: 20px;
  font-weight: 900;
}

.detail-hero {
  padding: 46px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #a5f3fc;
}

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

.player-card,
.detail-side,
.detail-content,
.related-panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 18rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.38));
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.34);
  font-size: 32px;
}

.play-overlay strong {
  font-size: 20px;
}

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(30px, 5vw, 56px);
}

.detail-title p {
  margin: 16px 0 0;
}

.detail-side {
  overflow: hidden;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-side-body {
  padding: 20px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  text-align: right;
}

.detail-content {
  margin-top: 28px;
  padding: clamp(24px, 4vw, 42px);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 34px);
}

.detail-content p + h2 {
  margin-top: 30px;
}

.related-panel {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 34px);
}

.related-panel h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 3vw, 34px);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 1fr;
  gap: 34px;
  padding: 42px 0 30px;
}

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

.site-footer p {
  max-width: 480px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: #a5f3fc;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  color: var(--faint);
  border-top: 1px solid var(--line);
}

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

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

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

  .menu-button {
    display: block;
  }

  body.nav-open .mobile-nav {
    display: block;
    padding: 0 16px 16px;
  }

  .mobile-nav .nav-link {
    display: flex;
    margin-top: 8px;
  }

  .hero-slider {
    height: auto;
    min-height: 620px;
  }

  .hero-slide::before {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.82) 58%, rgba(15, 23, 42, 0.25));
  }

  .hero-controls {
    right: 16px;
    bottom: 24px;
  }

  .section-heading {
    display: grid;
  }

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

  .detail-layout,
  .footer-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .detail-side {
    display: grid;
    grid-template-columns: 190px 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.05em;
  }

  .hero-actions {
    display: grid;
  }

  .button-primary,
  .button-secondary,
  .section-more {
    width: 100%;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .category-card {
    min-height: 210px;
  }

  .rank-row {
    grid-template-columns: auto 72px 1fr;
  }

  .rank-row img {
    width: 72px;
    height: 96px;
  }

  .rank-score {
    grid-column: 3;
  }

  .detail-side {
    display: block;
  }

  .footer-bottom {
    display: grid;
  }
}
