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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(234, 88, 12, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.brand-name,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search {
  margin-left: auto;
  width: min(360px, 36vw);
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.big-search input,
.inline-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 12px 16px;
}

.header-search button,
.big-search button {
  border: 0;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  cursor: pointer;
}

.header-search button {
  align-self: stretch;
  padding: 0 18px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
}

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

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  min-height: clamp(620px, 74vh, 820px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.16) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(620px, 74vh, 820px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: 56px;
  padding: 80px 0 96px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(38px, 8vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.78;
}

.hero-tags,
.detail-meta,
.tag-cloud,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-cloud span,
.filter-chip {
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.11);
}

.hero-tags span,
.detail-meta span,
.tag-cloud span {
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.btn-primary {
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.24);
}

.btn-ghost {
  border: 1px solid rgba(248, 250, 252, 0.24);
  color: var(--text);
  background: rgba(15, 23, 42, 0.42);
}

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.6);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
}

.hero-poster img,
.poster-wrap img,
.category-cover img,
.ranking-poster img,
.detail-poster img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  width: 36px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.search-panel,
.content-section,
.split-section,
.page-hero,
.detail-layout,
.detail-content,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 500px);
  gap: 28px;
  align-items: center;
  margin-top: -48px;
  position: relative;
  z-index: 5;
  padding: 28px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.search-panel p,
.section-head p,
.movie-card p,
.category-overview-card p,
.story-panel p,
.site-footer p,
.category-tile p,
.ranking-item p {
  color: var(--muted);
  line-height: 1.72;
}

.big-search,
.inline-search {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.52);
}

.big-search input,
.inline-search input {
  padding: 17px 20px;
}

.big-search button {
  padding: 0 26px;
}

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

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

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

.section-head p {
  max-width: 720px;
  margin: 10px 0 0;
}

.section-more,
.card-link,
.sample-links a {
  color: var(--amber);
  font-weight: 900;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

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

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

.poster-shine,
.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 32%, rgba(2, 6, 23, 0.86) 100%);
}

.type-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.movie-title {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover,
.ranking-title:hover,
.category-overview-card h2 a:hover {
  color: var(--amber);
}

.movie-meta {
  margin: 8px 0 10px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
}

.card-link {
  display: inline-flex;
  margin-top: 8px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
}

.movie-card-compact .poster-wrap {
  aspect-ratio: auto;
  min-height: 100%;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: end;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile div {
  position: relative;
  z-index: 2;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  padding-top: 72px;
}

.panel-section {
  width: auto;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.56);
}

.ranking-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 46px 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.35);
}

.ranking-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.ranking-poster {
  width: 64px;
  height: 86px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
}

.ranking-title {
  color: #fff;
  font-weight: 900;
}

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

.page-hero {
  margin-top: 38px;
  padding: 60px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.20), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
}

.slim-hero h1,
.library-hero h1,
.ranking-hero h1,
.category-page-hero h1 {
  font-size: clamp(36px, 7vw, 66px);
}

.inline-search {
  max-width: 620px;
  margin-top: 28px;
}

.filter-row {
  margin-top: 18px;
}

.filter-chip {
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 900;
}

.filter-chip.active,
.filter-chip:hover {
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.category-overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
}

.category-cover {
  height: 260px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.6);
}

.category-overview-card h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 24px;
}

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

.rank-board {
  padding-top: 28px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-bottom: 1px solid var(--line);
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.46)),
    linear-gradient(180deg, transparent, #020617 96%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 44px;
  align-items: end;
  min-height: 560px;
  padding: 74px 0 58px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

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

.breadcrumb a {
  color: var(--amber);
  font-weight: 800;
}

.detail-meta,
.tag-cloud {
  margin-top: 22px;
}

.detail-content {
  padding-top: 54px;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.26), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  font-size: 34px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.35);
}

.story-panel {
  margin-top: 32px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
}

.story-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 4vw, 34px);
}

.story-panel p + h2 {
  margin-top: 28px;
}

.related-section {
  padding-top: 44px;
}

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

.site-footer {
  padding: 82px 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin-top: 9px;
  color: var(--muted-strong);
}

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

.copyright {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

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

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

@media (max-width: 880px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .mobile-nav {
    position: fixed;
    inset: 74px 16px auto 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .mobile-nav {
    display: flex;
  }

  .hero-content,
  .detail-layout,
  .search-panel,
  .split-section,
  .category-overview-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 28px;
    padding-top: 58px;
  }

  .hero-poster {
    width: min(280px, 70vw);
  }

  .page-hero,
  .search-panel,
  .panel-section,
  .story-panel {
    padding: 24px;
  }

  .detail-layout {
    align-items: start;
  }

  .detail-poster {
    width: min(280px, 72vw);
  }

  .ranking-list-page,
  .top-rank-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .search-panel,
  .content-section,
  .split-section,
  .page-hero,
  .detail-layout,
  .detail-content,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

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

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

  .hero-copy h1,
  .detail-info h1 {
    font-size: 40px;
  }

  .big-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .big-search button {
    min-height: 50px;
  }

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

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

  .movie-title {
    font-size: 16px;
  }

  .movie-card p {
    display: none;
  }

  .movie-card-compact {
    grid-template-columns: 92px minmax(0, 1fr);
  }

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

  .category-overview-card {
    padding: 16px;
  }

  .category-cover {
    height: 220px;
  }

  .ranking-item {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .footer-grid {
    padding: 22px;
  }
}

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