:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(249, 115, 22, 0.14), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  min-height: 100vh;
}

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

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

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.32);
}

.brand-name {
  font-size: 22px;
  letter-spacing: 0.04em;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(245, 158, 11, 0.16);
}

.nav-dropdown {
  position: relative;
}

.nav-more {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 180px;
  padding: 10px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: grid;
  gap: 6px;
}

.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
}

.nav-dropdown-menu a:hover {
  color: var(--amber);
  background: rgba(255, 255, 255, 0.06);
}

.search-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
}

.search-form input,
.mobile-search input {
  width: 220px;
  padding: 10px 12px;
  color: white;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-form button,
.mobile-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  color: white;
  cursor: pointer;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.26);
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.mobile-menu-btn span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 5px auto;
  background: white;
}

.mobile-panel {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel a {
  display: block;
  padding: 12px 4px;
  color: var(--muted-strong);
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, #020617 0%, transparent 54%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding: 72px 0;
}

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

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

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 640px;
  margin: 0 0 26px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta span,
.pill,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.56);
}

.hero-meta span:first-child {
  color: white;
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(249, 115, 22, 0.9));
}

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

.secondary-btn {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.36);
  box-shadow: none;
}

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

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

.hero-dots button.is-active {
  background: var(--amber);
}

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

.content-section.alt {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), transparent);
}

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

.section-head h1,
.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--amber);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.17);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.12);
}

.poster-box {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.24), transparent 34%),
    linear-gradient(145deg, #1e293b, #020617);
}

.poster-box::before {
  content: attr(data-title);
  position: absolute;
  inset: auto 14px 14px;
  z-index: 1;
  display: none;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.poster-box.missing-poster::before {
  display: block;
}

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

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

.poster-play {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 16px);
  opacity: 0;
  z-index: 2;
  min-width: max-content;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
  transition: 0.2s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.movie-info h3 a:hover {
  color: var(--amber);
}

.movie-info p {
  margin: 0;
  min-height: 58px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.horizontal-strip {
  display: grid;
  gap: 16px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 142px 1fr;
}

.horizontal-card .poster-box {
  aspect-ratio: 2 / 3;
}

.horizontal-card .movie-info p {
  min-height: 0;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 28px;
}

.side-panel,
.glass-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 24px;
}

.side-panel h2,
.side-panel h3 {
  margin-top: 0;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent),
    rgba(15, 23, 42, 0.72);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
}

.category-tile p {
  color: var(--muted);
  line-height: 1.7;
}

.category-tile strong {
  color: var(--amber);
}

.page-hero {
  padding: 78px 0 34px;
  background:
    radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.15), transparent 26%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), transparent);
}

.page-hero h1 {
  max-width: 980px;
  margin: 12px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  color: var(--muted-strong);
  line-height: 1.85;
  font-size: 17px;
}

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

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

.player-section {
  padding: 36px 0 72px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.20), transparent 26%),
    rgba(0, 0, 0, 0.34);
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 34px;
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.32);
}

.play-overlay.is-hidden {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 28px;
  margin-top: 28px;
}

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

.detail-copy h2 {
  margin: 0 0 16px;
}

.detail-copy p {
  color: var(--muted-strong);
  line-height: 1.9;
}

.info-table {
  display: grid;
  gap: 12px;
}

.info-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-row span:first-child {
  color: var(--muted);
}

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

.rank-number {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 96px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

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

.rank-row p {
  color: var(--muted);
  line-height: 1.65;
}

.search-results {
  min-height: 360px;
}

.empty-state {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.7);
}

.site-footer {
  margin-top: 44px;
  padding: 50px 0;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 1fr;
  gap: 36px;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  line-height: 1.85;
}

.footer-grid a {
  display: block;
}

.footer-grid a:hover {
  color: var(--amber);
}

.footer-links {
  columns: 2;
}

.footer-brand {
  margin-bottom: 14px;
}

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

@media (max-width: 920px) {
  .main-nav,
  .search-form {
    display: none;
  }

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

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

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

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

  .rank-row img {
    width: 72px;
    height: 96px;
  }

  .rank-row .primary-btn {
    grid-column: 3;
    width: max-content;
  }
}

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

  .header-inner {
    height: 64px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-actions {
    display: grid;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info p {
    display: none;
  }

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

  .horizontal-card {
    grid-template-columns: 104px 1fr;
  }

  .page-hero {
    padding-top: 46px;
  }
}
