:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: rgba(245, 158, 11, 0.2);
  --accent: #f59e0b;
  --accent-bright: #fbbf24;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-bright);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark,
.footer-brand span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
}

.brand-name {
  white-space: nowrap;
  font-size: 1.2rem;
}

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

.nav-link,
.mobile-link {
  color: #e2e8f0;
  font-size: 0.95rem;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: var(--accent-bright);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.88);
  border-radius: 14px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-panel input,
.filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  width: 190px;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-panel button {
  border: 0;
  padding: 10px 14px;
  color: #111827;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 1.6rem;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: linear-gradient(
    90deg,
    rgba(2, 6, 23, 0.98),
    rgba(120, 53, 15, 0.52),
    rgba(2, 6, 23, 0.92)
  );
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.6s ease,
    transform 1.4s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.28;
  background: radial-gradient(
    circle at 30% 40%,
    rgba(245, 158, 11, 0.3),
    transparent 30rem
  );
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image img.image-hidden,
.poster-wrap img.image-hidden,
.rank-cover img.image-hidden,
.detail-cover img.image-hidden,
.related-thumb img.image-hidden {
  opacity: 0;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) 360px;
  gap: 44px;
  align-items: center;
  min-height: 620px;
  padding: 72px 0;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--accent-bright);
  background: rgba(15, 23, 42, 0.68);
  font-weight: 700;
}

.hero h1 {
  max-width: 850px;
  margin: 0 0 20px;
  font-size: clamp(2.6rem, 7vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
  color: var(--accent-bright);
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions,
.section-head,
.detail-actions,
.pagination-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.btn {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.24);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.66);
}

.btn-soft {
  color: var(--accent-bright);
  background: rgba(245, 158, 11, 0.12);
}

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

.hero-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card .poster-wrap {
  height: 410px;
  border-radius: 22px;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 600px;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.66);
}

.hero-search input {
  padding: 16px 18px;
  font-size: 1rem;
}

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

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

.hero-dot.active {
  background: var(--accent-bright);
}

main,
.page-section {
  display: block;
}

.section {
  padding: 64px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent-bright);
  font-weight: 800;
}

.section h2,
.page-title,
.detail-title {
  margin: 0;
  color: var(--accent-bright);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section h2,
.page-title {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.section-desc,
.page-desc {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card,
.category-card,
.info-card,
.player-shell,
.detail-panel,
.search-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.movie-card {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  height: 300px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(245, 158, 11, 0.42),
      transparent 16rem
    ),
    linear-gradient(135deg, #111827, #1e293b);
}

.compact-card .poster-wrap {
  height: 210px;
}

.poster-wrap img,
.rank-cover img,
.detail-cover img,
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.5s ease,
    opacity 0.2s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 35%,
    rgba(2, 6, 23, 0.88) 100%
  );
}

.year-pill,
.rank-badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.year-pill {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 6px 10px;
  color: #111827;
  background: var(--accent-bright);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: var(--accent-bright);
  font-size: 1.16rem;
  line-height: 1.35;
}

.card-body p {
  min-height: 3.5em;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.card-meta,
.tag-row,
.breadcrumb,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-meta {
  color: var(--dim);
  font-size: 0.88rem;
}

.card-meta span,
.card-meta a,
.tag-row span,
.breadcrumb a,
.breadcrumb span,
.detail-meta span {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(2, 6, 23, 0.32);
}

.card-meta a,
.breadcrumb a {
  color: var(--accent-bright);
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: #fef3c7;
  font-size: 0.78rem;
}

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

.category-card {
  padding: 24px;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: var(--accent-bright);
  font-size: 1.3rem;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.page-hero {
  padding: 68px 0 36px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 28px 0;
}

.filter-input,
.search-panel input {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.8);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 112px 1fr;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  font-size: 1.15rem;
  font-weight: 900;
}

.rank-cover {
  height: 138px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #334155);
}

.rank-row h3 {
  margin: 0 0 8px;
  color: var(--accent-bright);
  font-size: 1.2rem;
}

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

.detail-hero {
  padding: 38px 0 24px;
}

.breadcrumb {
  margin-bottom: 22px;
  color: var(--dim);
  font-size: 0.92rem;
}

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

.player-shell {
  position: relative;
  padding: 16px;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82)),
    radial-gradient(
      circle at center,
      rgba(245, 158, 11, 0.22),
      transparent 22rem
    );
  cursor: pointer;
}

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

.play-core {
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.38);
  font-size: 2rem;
}

.play-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.detail-title {
  margin: 24px 0 14px;
  font-size: clamp(2rem, 5vw, 4.1rem);
}

.detail-intro {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2,
.detail-panel h3 {
  margin: 0 0 14px;
  color: var(--accent-bright);
}

.detail-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.9;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #334155);
  box-shadow: var(--shadow);
}

.detail-cover img {
  min-height: 470px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.34);
}

.related-thumb {
  height: 94px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #334155);
}

.related-item h3 {
  margin: 0 0 6px;
  color: var(--accent-bright);
  font-size: 0.98rem;
}

.related-item p {
  margin: 0;
  color: var(--dim);
  font-size: 0.85rem;
  line-height: 1.55;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  margin: 28px 0;
}

.empty-state {
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 22px;
  padding: 28px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.58);
}

.sitemap-columns {
  columns: 4 220px;
  column-gap: 30px;
}

.sitemap-columns a {
  display: block;
  break-inside: avoid;
  margin: 0 0 10px;
  color: #e2e8f0;
}

.sitemap-columns a:hover {
  color: var(--accent-bright);
}

.info-card {
  padding: 28px;
}

.info-card h1 {
  margin: 0 0 18px;
  color: var(--accent-bright);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.info-card h2 {
  margin: 28px 0 12px;
  color: var(--accent-bright);
}

.info-card p,
.info-card li {
  color: var(--muted);
  line-height: 1.9;
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-card {
    display: none;
  }

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

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

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

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

  .hero-content {
    padding: 50px 0 72px;
  }

  .hero-search,
  .filter-bar,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.featured-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap {
    height: 260px;
  }

  .rank-row {
    grid-template-columns: 48px 82px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .rank-cover {
    height: 104px;
  }

  .detail-cover img {
    min-height: 360px;
  }
}
