* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #ef4444;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 8%, rgba(234, 88, 12, 0.12), transparent 28rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
  transition: transform 0.28s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-2deg);
}

.brand-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
}

.brand-text,
.footer-brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: var(--muted-strong);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(51, 65, 85, 0.64);
  border-radius: 999px;
  padding: 7px 8px 7px 16px;
}

.header-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #94a3b8;
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.section-link,
.rail-btn,
.play-trigger {
  border: 0;
  cursor: pointer;
}

.header-search button,
.mobile-search button {
  color: #ffffff;
  border-radius: 999px;
  padding: 7px 13px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.7);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-nav-link {
  padding: 10px 12px;
  color: var(--muted-strong);
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.45);
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, var(--bg), transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 560px;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  border-radius: 999px;
  padding: 7px 13px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
  color: #e2e8f0;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-list span,
.stat-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--line);
}

.hero-meta span,
.detail-meta span,
.tag-list span,
.stat-pill {
  padding: 6px 11px;
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 16px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 700px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 28px rgba(234, 88, 12, 0.26);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

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

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

.hero-dot {
  width: 26px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 42px;
  background: #f59e0b;
}

.section {
  padding: 56px 0;
}

.section-muted {
  background: rgba(30, 41, 59, 0.28);
}

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

.section-head h2,
.page-title h1,
.detail-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.9);
  border: 1px solid var(--line);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1e293b;
}

.movie-card-compact .card-cover {
  aspect-ratio: 16 / 9;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.78));
  opacity: 0.78;
}

.card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #ffffff;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.94);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.year-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

.card-body p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.rail-wrap {
  position: relative;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-actions {
  display: flex;
  gap: 8px;
}

.rail-btn {
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.95);
}

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

.category-card,
.stat-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.78));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.category-card {
  padding: 24px;
  min-height: 168px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-card h3,
.stat-card h3,
.info-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
}

.category-card p,
.info-card p,
.info-card li {
  color: var(--muted);
  line-height: 1.75;
}

.category-count {
  display: inline-flex;
  margin-top: 12px;
  color: #fbbf24;
  font-weight: 800;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  color: #fbbf24;
  font-size: 32px;
}

.page-hero {
  padding: 74px 0 38px;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.76)),
    radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.18), transparent 20rem);
}

.page-title {
  max-width: 880px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 180px 150px;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
}

.filter-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.filter-field input,
.filter-field select {
  width: 100%;
  height: 44px;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  outline: 0;
  background: rgba(30, 41, 59, 0.88);
  padding: 0 12px;
}

.filter-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: #fbbf24;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  font-weight: 800;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 76px 112px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.82);
}

.ranking-number {
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-row h3 {
  margin: 0 0 8px;
  color: #ffffff;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hot-score {
  color: #fbbf24;
  white-space: nowrap;
  font-weight: 900;
}

.detail-hero {
  padding: 46px 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76)),
    radial-gradient(circle at 82% 10%, rgba(245, 158, 11, 0.18), transparent 26rem);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.78fr;
  gap: 28px;
  align-items: start;
}

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

.player-card {
  overflow: hidden;
}

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

.video-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.22);
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
}

.play-trigger {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 38px rgba(234, 88, 12, 0.34);
  font-size: 34px;
}

.video-player.is-playing .player-cover {
  display: none;
}

.player-info {
  padding: 20px;
}

.detail-side {
  padding: 22px;
}

.detail-poster {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #1e293b;
}

.detail-title {
  margin-top: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  color: #e2e8f0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 13px;
}

.content-panel {
  padding: 28px;
  margin-top: 24px;
}

.content-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 26px;
}

.content-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

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

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

.info-card {
  padding: 24px;
}

.hidden-by-filter {
  display: none !important;
}

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

  .header-search {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

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

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

  .filter-field-wide,
  .filter-count {
    grid-column: 1 / -1;
  }

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

  .ranking-row {
    grid-template-columns: 54px 92px 1fr;
  }

  .hot-score {
    grid-column: 2 / -1;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .hero,
  .hero-content {
    min-height: 540px;
  }

  .hero-copy {
    padding: 58px 0;
  }

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

  .section {
    padding: 42px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .stats-grid,
  .related-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .movie-rail {
    grid-auto-columns: 78%;
  }

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

  .filter-field-wide,
  .filter-count {
    grid-column: auto;
  }

  .ranking-row {
    grid-template-columns: 44px 82px 1fr;
    gap: 10px;
  }

  .ranking-row img {
    width: 82px;
  }

  .ranking-row p {
    display: none;
  }

  .play-trigger {
    width: 74px;
    height: 74px;
  }
}
