:root {
  color-scheme: dark;
  --bg: #070b14;
  --bg-soft: #101827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --card: rgba(15, 23, 42, 0.72);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --orange: #f97316;
  --orange-dark: #c2410c;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.25), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.18), transparent 25%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
  z-index: -1;
}

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: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.36);
}

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

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

.main-nav a:hover {
  color: white;
  background: rgba(249, 115, 22, 0.15);
  transform: translateY(-1px);
}

.top-search {
  width: min(300px, 28vw);
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.hero-search input {
  width: 100%;
  color: white;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 16px;
}

.top-search button,
.hero-search button {
  border: 0;
  color: white;
  cursor: pointer;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

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

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: white;
  border-radius: 999px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.015);
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  filter: saturate(1.2) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 48px));
  padding: 120px 0 110px;
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.hero-kicker,
.page-hero span,
.section-heading span,
.intro-card span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-content h1 {
  max-width: 720px;
  margin: 18px 0 18px;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-content p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span {
  color: #ffedd5;
  border: 1px solid rgba(251, 146, 60, 0.38);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  padding: 6px 10px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 96px;
  width: min(320px, 26vw);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  display: block;
  color: var(--muted);
  padding: 14px 16px;
  font-size: 14px;
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(16px);
}

.hero-control button {
  width: 38px;
  height: 38px;
  border: 0;
  color: white;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
  width: 30px;
  background: var(--orange);
}

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

.intro-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: stretch;
  margin-top: -54px;
  position: relative;
  z-index: 8;
}

.intro-card,
.intro-links,
.dark-panel,
.category-overview-card,
.detail-article,
.player-shell,
.detail-side {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.intro-card {
  border-radius: var(--radius);
  padding: 32px;
}

.intro-card h2 {
  margin: 10px 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
}

.intro-card p,
.section-heading p,
.page-hero p,
.category-overview-card p,
.detail-article p {
  color: var(--muted);
  line-height: 1.85;
}

.intro-links {
  min-width: 240px;
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.intro-links a,
.text-link {
  color: #fed7aa;
  font-weight: 800;
}

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: white;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.9);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), #fb923c);
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.28);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #fed7aa;
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.12);
}

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

.movie-card p {
  min-height: 54px;
  margin: 0 0 14px;
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dark-panel {
  max-width: 1232px;
  border-radius: 30px;
  margin-top: 32px;
  margin-bottom: 32px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 74px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.32);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), #fb923c);
  font-weight: 950;
}

.rank-thumb img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.rank-item p {
  color: var(--subtle);
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-more {
  text-align: center;
  margin-top: 30px;
}

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

.category-tile {
  display: block;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.66);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.5);
}

.category-covers,
.category-overview-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.category-covers img,
.category-overview-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-tile strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.category-tile span {
  color: var(--subtle);
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 78px 24px 38px;
}

.small-hero {
  padding-bottom: 18px;
}

.hero-search {
  width: min(720px, 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  margin-top: 26px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-chip {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  padding: 9px 14px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: white;
  border-color: rgba(249, 115, 22, 0.58);
  background: rgba(249, 115, 22, 0.18);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  border-radius: 26px;
  padding: 18px;
}

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

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 56%, rgba(2, 6, 23, 0.5) 100%),
    linear-gradient(0deg, #020617 0%, transparent 52%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 24px 92px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 46px;
  align-items: end;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #fed7aa;
}

.detail-line {
  max-width: 800px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
}

.large-meta {
  margin: 18px 0;
  font-size: 14px;
}

.detail-tags {
  margin: 20px 0 28px;
}

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

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

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: white;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28), rgba(2, 6, 23, 0.72));
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 20px 52px rgba(249, 115, 22, 0.42);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  color: white;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  padding: 8px 12px;
  font-size: 13px;
}

.player-shell.is-playing .player-status {
  display: none;
}

.detail-article {
  border-radius: 28px;
  padding: 30px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-article h2:not(:first-child) {
  margin-top: 32px;
}

.detail-side {
  align-self: start;
  border-radius: 28px;
  padding: 22px;
  position: sticky;
  top: 96px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong,
.side-item em {
  display: block;
}

.side-item em {
  color: var(--subtle);
  font-style: normal;
  font-size: 13px;
  margin-top: 6px;
}

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

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--subtle);
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 6px 0;
}

.footer-grid a:hover {
  color: #fed7aa;
}

.footer-grid h4 {
  margin: 0 0 14px;
  color: white;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.no-results {
  grid-column: 1 / -1;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  padding: 28px;
  text-align: center;
}

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

  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 920px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 14px 18px;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 3;
  }

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

  .top-search {
    width: 100%;
    order: 4;
  }

  .hero-slider {
    min-height: 720px;
  }

  .hero-content {
    width: auto;
    margin: 0;
    padding: 86px 22px 310px;
  }

  .hero-poster {
    width: 210px;
    right: 22px;
    bottom: 86px;
  }

  .intro-strip,
  .detail-layout,
  .footer-grid,
  .category-overview-card,
  .detail-shell {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    position: static;
  }

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

@media (max-width: 720px) {
  .content-section,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

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

  .rank-item {
    grid-template-columns: 36px 62px 1fr;
  }

  .rank-thumb img {
    width: 62px;
    height: 86px;
  }

  .hero-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }

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

  .detail-shell {
    padding-top: 44px;
  }

  .footer-grid {
    gap: 18px;
  }
}

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

  .hero-poster {
    width: 168px;
  }
}
