:root {
  color-scheme: dark;
  --bg: #070914;
  --panel: rgba(18, 22, 40, 0.86);
  --panel-strong: rgba(25, 31, 56, 0.94);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f6f7fb;
  --muted: #aeb7c8;
  --accent: #f43f5e;
  --accent-2: #7c3aed;
  --gold: #fbbf24;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(244, 63, 94, 0.24), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(124, 58, 237, 0.22), transparent 32rem),
    linear-gradient(180deg, #090b18 0%, #070914 48%, #0c1020 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px min(5vw, 72px);
  background: rgba(7, 9, 20, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.32);
}

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

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

.main-nav a,
.nav-pill {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.nav-pill:hover {
  color: #fff;
  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;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  padding: 86px min(5vw, 72px) 72px;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(7, 9, 20, 0.92) 0%, rgba(7, 9, 20, 0.72) 42%, rgba(7, 9, 20, 0.18) 100%);
  z-index: 1;
}

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

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

.hero p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 42px rgba(244, 63, 94, 0.26);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.hero-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.hero-tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.hero-tab.is-active {
  color: #fff;
  background: rgba(244, 63, 94, 0.28);
}

.section,
.page-hero,
.detail-wrap {
  padding: 54px min(5vw, 72px);
}

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

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

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

.movie-card,
.category-card,
.stat-card,
.detail-panel,
.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.movie-card {
  min-width: 0;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover,
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 63, 94, 0.42);
  background: rgba(31, 38, 66, 0.94);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.24), rgba(124, 58, 237, 0.18));
}

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

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

.poster-badge,
.detail-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(7, 9, 20, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-meta-line {
  color: var(--muted);
  font-size: 12px;
}

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

.movie-card p {
  margin: 0;
  min-height: 60px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
}

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

.category-card {
  display: block;
  padding: 24px;
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 130px 80px 70px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.rank-no {
  color: var(--gold);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-type,
.rank-year,
.rank-heat {
  color: var(--muted);
  font-size: 14px;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #fff;
  background: rgba(7, 9, 20, 0.72);
  outline: none;
}

.filter-panel input {
  flex: 1;
  min-width: 220px;
  padding: 0 16px;
}

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

.filter-panel select {
  padding: 0 12px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 58px min(5vw, 72px);
  background:
    linear-gradient(90deg, rgba(7, 9, 20, 0.95), rgba(7, 9, 20, 0.6)),
    var(--detail-bg);
  background-size: cover;
  background-position: center;
}

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

.detail-poster img {
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.player-card {
  padding: 20px;
  background: #050712;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.28), rgba(0, 0, 0, 0.56));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-box.is-playing .play-overlay {
  visibility: hidden;
  opacity: 0;
}

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 46px rgba(244, 63, 94, 0.36);
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
}

.detail-panel {
  padding: 28px;
}

.detail-section + .detail-section {
  margin-top: 28px;
}

.detail-section p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.9;
}

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

.side-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.side-item img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.side-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.site-footer {
  padding: 42px min(5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
}

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

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

.is-hidden {
  display: none !important;
}

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

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

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

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    padding: 14px 18px;
  }

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

  .main-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(7, 9, 20, 0.96);
  }

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

  .hero {
    min-height: 680px;
    padding: 70px 20px 48px;
  }

  .section,
  .page-hero,
  .detail-wrap {
    padding: 40px 20px;
  }

  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-selects {
    flex-direction: column;
  }

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

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

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

  .rank-type,
  .rank-heat {
    display: none;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 38px 20px;
  }

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