:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --brand: #f97316;
  --brand-2: #facc15;
  --danger: #ef4444;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(249, 115, 22, 0.24), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(250, 204, 21, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 12px 34px rgba(249, 115, 22, 0.32);
}

.brand-name {
  font-size: 1.15rem;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #fff;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 70vh;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.08);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-copy {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 11vh;
  width: min(640px, calc(100% - 64px));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 56rem;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn,
.text-link,
.section-more,
.search-strip button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-btn,
.search-strip button,
.filter-bar button {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.28);
  cursor: pointer;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 9vh;
  width: min(300px, calc(100% - 48px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel p {
  margin: 0 0 14px;
  color: #fff;
  font-weight: 800;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
}

.quick-search,
.content-section,
.search-page,
.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search {
  transform: translateY(-34px);
  position: relative;
  z-index: 5;
}

.search-strip,
.filter-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-strip label {
  color: #fff;
  font-weight: 900;
}

.search-strip input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
  outline: none;
}

.filter-bar {
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  margin-bottom: 28px;
}

.content-section {
  padding: 58px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--brand-2);
}

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

.category-tile {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.46);
}

.category-tile span {
  color: #fff;
  font-size: 1.18rem;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted);
}

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

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

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

.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.4s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.card-body {
  padding: 15px;
}

.card-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.card-text {
  min-height: 3.1em;
  margin: 9px 0 12px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.card-body .tag-row span {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 0.75rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-item strong {
  color: var(--brand-2);
  font-size: 1.18rem;
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item b,
.rank-item small {
  display: block;
}

.rank-item small {
  color: var(--muted);
}

.spotlight-box,
.text-panel,
.category-overview-card,
.page-hero,
.detail-hero,
.player-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.spotlight-box {
  align-self: start;
  padding: 28px;
  position: sticky;
  top: 96px;
}

.spotlight-box h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1.1;
}

.spotlight-box p {
  color: var(--muted);
}

.page-main {
  padding: 36px 0 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  margin-bottom: 38px;
}

.compact-hero h1,
.category-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  letter-spacing: -0.05em;
}

.compact-hero p,
.category-hero p {
  max-width: 760px;
  color: #cbd5e1;
}

.category-hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.2fr;
  gap: 30px;
  align-items: center;
}

.category-hero > img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 22px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 20px;
  padding: 22px;
}

.overview-copy h2 {
  margin: 0 0 8px;
}

.overview-copy p:not(.eyebrow) {
  color: var(--muted);
}

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

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

.ranking-section {
  padding-top: 0;
}

.rank-grid .movie-card:nth-child(-n + 3) {
  border-color: rgba(250, 204, 21, 0.5);
}

.search-page {
  padding-bottom: 80px;
}

.search-grid .movie-card.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--muted);
}

.breadcrumb a {
  color: #fff;
}

.detail-main {
  width: min(1120px, calc(100% - 32px));
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  padding: clamp(22px, 4vw, 36px);
  margin-bottom: 30px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
}

.detail-one-line {
  color: #dbeafe;
  font-size: 1.1rem;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.meta-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.meta-list dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  padding: clamp(18px, 3vw, 30px);
  margin-bottom: 30px;
}

.player-section h2 {
  margin: 0 0 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.34), rgba(2, 6, 23, 0.64) 56%, rgba(0, 0, 0, 0.86));
  cursor: pointer;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.35);
}

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

.text-panel {
  padding: 24px;
}

.text-panel h2 {
  margin: 0 0 12px;
}

.text-panel p {
  color: #cbd5e1;
}

.related-section {
  width: 100%;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

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

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

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

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.94);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-copy {
    bottom: 13vh;
  }

  .hero-panel {
    left: 24px;
    right: 24px;
    bottom: 22px;
    width: auto;
  }

  .search-strip,
  .filter-bar,
  .split-layout,
  .category-hero,
  .category-overview-card,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

  .spotlight-box {
    position: static;
  }
}

@media (max-width: 600px) {
  .header-inner,
  .quick-search,
  .content-section,
  .search-page,
  .page-main,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero,
  .hero-stage,
  .hero-slide img {
    min-height: 78vh;
  }

  .hero-copy {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 16vw, 4.2rem);
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-text {
    display: none;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

  .player-shell {
    border-radius: 16px;
  }
}
