:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-deep: #b45309;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.16), transparent 28rem),
    var(--bg);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.brand {
  font-size: 21px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--accent-light);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(148, 163, 184, 0.12);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-link {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

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

.hero-shade-side {
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 36%, rgba(2, 6, 23, 0.28) 72%, rgba(2, 6, 23, 0.04) 100%);
}

.hero-shade-bottom {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 42%, transparent 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding-top: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 16px;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 78px);
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #d1d5db;
}

.hero-meta span,
.card-meta span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.55);
}

.hero p {
  margin: 24px 0 0;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.9;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.secondary-btn,
.ghost-link,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  padding: 13px 22px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-link:hover,
.text-btn:hover {
  transform: translateY(-2px);
}

.primary-btn.small {
  padding: 10px 16px;
  font-size: 14px;
}

.secondary-btn {
  padding: 12px 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.54);
}

.secondary-btn:hover {
  border-color: rgba(245, 158, 11, 0.52);
}

.text-btn {
  color: var(--accent-light);
}

.ghost-link {
  padding: 10px 16px;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.62);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  background: var(--accent-light);
}

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.detail-content h2,
.category-panel h2 {
  margin: 8px 0 10px;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p,
.category-panel p,
.page-hero p,
.detail-content p,
.footer-grid p {
  color: var(--muted-strong);
  line-height: 1.9;
}

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

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.search-box {
  display: grid;
  gap: 9px;
  color: #d1d5db;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  padding: 14px 16px;
  color: #ffffff;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.68);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

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

.filter-btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  color: #d1d5db;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  color: #111827;
  border-color: transparent;
  background: var(--accent-light);
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.26));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 18px;
}

.category-tile span {
  margin-top: 112px;
  color: #ffffff;
  font-size: 21px;
  font-weight: 900;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 14px;
}

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.7;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(15, 23, 42, 0.94);
}

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

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  color: #111827;
  background: var(--accent-light);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, var(--accent));
}

.card-body {
  padding: 15px;
}

.card-meta {
  gap: 6px;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 8px;
}

.card-body h3 {
  margin: 12px 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h3 a:hover,
.category-panel h2 a:hover {
  color: var(--accent-light);
}

.card-body p {
  margin: 0 0 12px;
  color: #aeb9c8;
  font-size: 14px;
  line-height: 1.72;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 84px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.rank-index {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  font-weight: 900;
  background: var(--accent-light);
}

.rank-thumb {
  display: block;
  width: 84px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 7px;
  color: #ffffff;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 9px;
  color: #aeb9c8;
  line-height: 1.6;
}

.page-hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 84px 24px 54px;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 24px;
  z-index: -1;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(59, 130, 246, 0.1)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(40px, 6vw, 68px);
}

.page-hero p {
  max-width: 860px;
  font-size: 18px;
}

.category-hero::before {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.64)),
    var(--hero-bg) center / cover;
}

.category-overview {
  display: grid;
  gap: 22px;
}

.category-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 30px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mini-posters a {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.mini-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-posters span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 520px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  object-fit: cover;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.7));
}

.player-overlay.hidden {
  display: none;
}

.big-play {
  width: 86px;
  height: 86px;
  padding-left: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: var(--accent-light);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.42);
}

.detail-info {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-poster {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 20px;
}

.detail-info h1 {
  font-size: clamp(32px, 4vw, 54px);
}

.detail-info p {
  color: #d1d5db;
  line-height: 1.85;
}

.detail-meta {
  margin-bottom: 15px;
}

.big-tags {
  margin-top: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  font-size: 20px;
  margin-bottom: 12px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #94a3b8;
  font-size: 14px;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

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

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

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

  .mini-posters {
    max-width: 520px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-wrap {
    height: 64px;
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-content {
    align-items: flex-end;
    padding: 0 18px 86px;
  }

  .hero-shade-side {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 58%, rgba(2, 6, 23, 0.22) 100%);
  }

  .hero-copy {
    padding-top: 0;
  }

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

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .section-wrap,
  .page-hero,
  .breadcrumb,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

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

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

  .rank-row .ghost-link {
    grid-column: 2 / -1;
    justify-self: flex-start;
  }

  .player-shell,
  .player-shell video {
    min-height: 280px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 34px 16px;
  }
}

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-link {
    width: 100%;
  }
}
