:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.16);
  --accent: #f59e0b;
  --accent-2: #ea580c;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fbbf24, #fb923c, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.24);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 20px;
}

main {
  padding-top: 70px;
}

.hero {
  position: relative;
  min-height: 560px;
  height: 72vh;
  overflow: hidden;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.24)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.44) 45%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 76px 22px 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 340px;
  align-items: center;
  gap: 54px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-size: 12px;
  line-height: 1.2;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: #dbe4ef;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.card-meta,
.detail-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--muted);
}

.hero-meta {
  margin-top: 22px;
  font-size: 14px;
}

.hero-meta span:first-child,
.card-meta span:first-child,
.ranking-meta span:first-child {
  color: #fbbf24;
  font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  min-width: 138px;
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.26);
}

.ghost-btn,
.section-link,
.small-btn {
  padding: 12px 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.52);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.small-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.22);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.52);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

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

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

.content-section,
.page-shell,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px;
}

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

.section-heading h2,
.page-heading h1,
.detail-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-heading p,
.detail-copy p,
.category-intro {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.85;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.score,
.card-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.score {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: #111827;
  background: #fbbf24;
}

.card-type {
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.card-body {
  padding: 14px;
}

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

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

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.card-meta {
  margin-bottom: 12px;
  font-size: 12px;
}

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

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

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.2));
}

.category-tile strong,
.category-tile small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 42px;
  font-size: 22px;
}

.category-tile small {
  bottom: 18px;
  color: var(--muted-strong);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px 160px;
  gap: 12px;
  margin: 24px 0;
}

.search-box,
.site-filter {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.search-box input,
.site-filter {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
}

.search-box input {
  background: transparent;
}

.site-filter {
  padding: 0 14px;
}

.empty-state {
  display: none;
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted-strong);
  text-align: center;
}

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

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

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

.detail-main {
  padding-top: 110px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.1));
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.34);
  font-size: 30px;
}

.detail-side {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card-strong);
}

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

.detail-side-body {
  padding: 18px;
}

.detail-side-body h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-meta {
  margin: 14px 0;
  font-size: 13px;
}

.detail-copy {
  margin-top: 30px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.58);
}

.detail-copy h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-copy p {
  font-size: 16px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-card);
}

.ranking-row strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.ranking-row img {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h3 {
  margin: 0 0 10px;
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.footer-inner strong {
  color: #fbbf24;
}

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

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

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

  .hero-poster,
  .detail-side {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    padding: 12px 16px;
  }

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .hero {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    padding: 98px 18px 72px;
  }

  .hero-control {
    display: none;
  }

  .section-heading,
  .page-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .ranking-row {
    grid-template-columns: 42px 70px 1fr;
  }

  .ranking-row img {
    width: 70px;
    height: 96px;
  }

  .ranking-row .small-btn {
    grid-column: 3;
    justify-self: start;
  }

  .content-section,
  .page-shell,
  .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }
}

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