:root {
  color-scheme: dark;
  --bg: #070a14;
  --bg-soft: #0d1324;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #a7b0c2;
  --muted-strong: #cbd5e1;
  --brand: #8b5cf6;
  --brand-2: #06b6d4;
  --brand-3: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 26px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(139, 92, 246, 0.32), transparent 34rem),
    radial-gradient(circle at 78% 2%, rgba(6, 182, 212, 0.2), transparent 32rem),
    linear-gradient(180deg, #070a14 0%, #0b1020 48%, #060914 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 20, 0.72);
  backdrop-filter: blur(22px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.45);
}

.site-logo span,
.footer-logo {
  background: linear-gradient(135deg, #ffffff, #a5f3fc 52%, #f5d0fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.site-nav a {
  padding: 10px 14px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

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

.hero {
  position: relative;
  padding: 34px 0 26px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 560px;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  align-items: center;
  gap: 38px;
  padding: 58px;
  isolation: isolate;
}

.hero-slide.is-active {
  display: grid;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(90deg, rgba(7, 10, 20, 0.97) 0%, rgba(7, 10, 20, 0.78) 42%, rgba(7, 10, 20, 0.38) 100%),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.15);
  transform: scale(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 72% 25%, rgba(6, 182, 212, 0.26), transparent 20rem),
    radial-gradient(circle at 22% 78%, rgba(249, 115, 22, 0.2), transparent 18rem),
    linear-gradient(180deg, transparent, rgba(7, 10, 20, 0.86));
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero h2 {
  margin: 0 0 18px;
  max-width: 720px;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.tag-row span,
.detail-tags span,
.info-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
}

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

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.22);
}

.secondary-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-cover {
  position: relative;
  width: min(360px, 100%);
  justify-self: center;
}

.hero-cover a {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

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

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 620px;
  margin-top: 26px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.hero-search input {
  padding: 0 18px;
  border: 0;
  background: transparent;
}

.hero-search button {
  min-height: 46px;
  padding: 0 18px;
  color: #07111f;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.icon-button {
  width: 46px;
  padding: 0;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
}

.section {
  margin: 48px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

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

.category-card {
  display: flex;
  min-height: 156px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.36);
}

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

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

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.category-tabs a {
  padding: 9px 14px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.category-tabs a:hover,
.category-tabs a.active {
  color: #ffffff;
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(14, 165, 233, 0.16);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(15, 23, 42, 0.9);
}

.movie-card[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.06);
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.quality-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.quality-badge {
  right: 12px;
  color: #07111f;
  background: rgba(255, 255, 255, 0.88);
}

.rank-badge {
  left: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #db2777);
}

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

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

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(120px, 180px) minmax(120px, 180px);
  gap: 12px;
  margin: 20px 0 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-panel input,
.filter-panel select {
  padding: 0 16px;
}

.empty-state {
  display: none;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}

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

.page-hero {
  margin: 34px 0 28px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.page-hero p {
  max-width: 850px;
  margin: 16px 0 0;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.8;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  margin: 34px 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 78% 12%, rgba(6, 182, 212, 0.2), transparent 30rem),
    linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.07em;
}

.detail-summary {
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.85;
}

.detail-tags,
.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.info-chip {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.watch-panel,
.story-panel,
.related-panel {
  margin: 34px 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background:
    radial-gradient(circle, rgba(139, 92, 246, 0.34), transparent 18rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-mark {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 54px rgba(6, 182, 212, 0.3);
}

.play-mark svg {
  width: 34px;
  height: 34px;
  margin-left: 5px;
  fill: #ffffff;
}

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

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 22px;
}

.text-card,
.side-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.text-card h2,
.side-card h2,
.related-panel h2,
.watch-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.text-card p,
.side-card p {
  margin: 0 0 16px;
  color: var(--muted-strong);
  line-height: 1.9;
}

.side-card ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.side-card li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  color: var(--muted-strong);
  border-bottom: 1px solid var(--line);
}

.side-card li:last-child {
  border-bottom: 0;
}

.side-card span:first-child {
  color: var(--muted);
}

.site-footer {
  margin-top: 56px;
  padding: 42px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 20, 0.52);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  color: var(--muted);
}

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

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

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

  .hero-cover {
    width: min(300px, 80%);
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(7, 10, 20, 0.96);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 13px 14px;
  }

  .hero-slide {
    min-height: auto;
    padding: 34px 22px 86px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-controls {
    left: 22px;
    right: auto;
    bottom: 22px;
  }

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

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

  .footer-links {
    justify-content: start;
  }

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

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

  .detail-poster {
    width: min(260px, 100%);
  }
}

@media (max-width: 560px) {
  main,
  .header-inner,
  .footer-inner,
  .copyright {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-shell,
  .page-hero,
  .detail-hero,
  .player-card,
  .text-card,
  .side-card {
    border-radius: 22px;
  }

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

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

  .hero h2,
  .detail-info h1 {
    font-size: 34px;
  }

  .page-hero,
  .detail-hero {
    padding: 24px;
  }
}
