:root {
  color-scheme: dark;
  --bg: #070816;
  --bg-soft: #111225;
  --panel: rgba(21, 23, 45, 0.82);
  --panel-strong: rgba(28, 31, 58, 0.95);
  --text: #f8fbff;
  --muted: #a9b1c7;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ff4d8d;
  --accent-2: #7c5cff;
  --gold: #ffd166;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 92, 255, 0.25), transparent 34%),
    radial-gradient(circle at 95% 4%, rgba(255, 77, 141, 0.23), transparent 32%),
    linear-gradient(180deg, #070816 0%, #0d1022 45%, #090b17 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: rgba(7, 8, 22, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 35px rgba(255, 77, 141, 0.28);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.main-nav a {
  padding: 9px 13px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: 68px clamp(18px, 6vw, 84px) 92px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.25) brightness(0.38);
  transform: scale(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 22, 0.94), rgba(7, 8, 22, 0.55), rgba(7, 8, 22, 0.86)),
    radial-gradient(circle at 18% 35%, rgba(255, 77, 141, 0.22), transparent 34%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #ffe9f2;
  background: rgba(255, 77, 141, 0.18);
  border: 1px solid rgba(255, 77, 141, 0.32);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

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

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #d7dcef;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.info-chip,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: #dfe5ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  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(--accent), var(--accent-2));
  box-shadow: 0 16px 38px rgba(124, 92, 255, 0.32);
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: clamp(18px, 6vw, 84px);
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section,
.page-hero,
.detail-layout,
.categories-grid,
.rank-page {
  width: min(1480px, calc(100% - 36px));
  margin: 0 auto;
}

.section {
  padding: 56px 0;
}

.section-header,
.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-hero {
  align-items: center;
  min-height: 310px;
  padding: 64px 0 28px;
}

.section-kicker {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-header p,
.page-hero p,
.detail-title p,
.category-card p,
.rich-text p {
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  padding: 0 14px;
}

.search-panel select option {
  color: #111827;
}

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  background: var(--panel-strong);
  border-color: rgba(255, 255, 255, 0.22);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111225;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #12060b;
  background: var(--gold);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  min-height: 54px;
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.card-body p {
  display: -webkit-box;
  min-height: 67px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.rank-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px 68px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform 0.22s ease, background 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  background: var(--panel-strong);
}

.rank-item img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 15px;
}

.rank-num {
  color: var(--gold);
  font-size: 24px;
  font-weight: 900;
}

.rank-text {
  display: grid;
  gap: 5px;
}

.rank-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding-bottom: 64px;
}

.category-card {
  min-height: 220px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 77, 141, 0.15), rgba(124, 92, 255, 0.15)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-card .btn {
  margin-top: 16px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
}

.detail-layout {
  padding: 28px 0 72px;
}

.detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: end;
  margin: 20px 0 30px;
}

.detail-title .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.player-panel {
  position: relative;
  overflow: hidden;
  background: #050610;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.player-panel video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(124, 92, 255, 0.28), rgba(5, 6, 16, 0.86));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  border-radius: 50%;
  box-shadow: 0 18px 46px rgba(255, 77, 141, 0.38);
  cursor: pointer;
  font-size: 34px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 30px;
}

.rich-text,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

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

.rich-text p {
  margin: 0 0 18px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.related-list img {
  width: 70px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.related-list strong {
  display: block;
  margin-bottom: 6px;
}

.related-list span {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state.show {
  display: block;
}

.site-footer {
  padding: 46px clamp(18px, 4vw, 54px);
  color: var(--muted);
  background: rgba(5, 6, 16, 0.78);
  border-top: 1px solid var(--line);
}

.footer-brand {
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

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

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

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

  .main-nav {
    position: absolute;
    top: 78px;
    left: 18px;
    right: 18px;
    display: none;
    padding: 16px;
    background: rgba(7, 8, 22, 0.96);
    border: 1px solid var(--line);
    border-radius: 20px;
  }

  .main-nav.open {
    display: flex;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide,
  .detail-head,
  .content-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding-top: 42px;
  }

  .hero-poster {
    width: min(320px, 80vw);
    margin: 0 auto;
    transform: none;
  }

  .section-header,
  .page-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 14px 16px;
  }

  .logo {
    font-size: 17px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    min-height: auto;
    font-size: 15px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .rank-strip {
    grid-template-columns: 1fr;
  }
}
