:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-2: #111827;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-solid: #1e293b;
  --panel-soft: #263247;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --red: #ef4444;
  --radius: 20px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

* {
  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 30rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #111827 46%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  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);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark,
.footer-logo span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
  font-size: 17px;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  color: var(--muted-2);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--amber-2);
}

.nav-search {
  width: min(330px, 26vw);
  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.7);
}

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

.nav-search input {
  padding: 10px 14px 10px 18px;
}

.nav-search button,
.mobile-panel button,
.search-box button,
.primary-btn,
.ghost-btn {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
  padding: 10px 18px;
}

.nav-search button:hover,
.mobile-panel button:hover,
.search-box button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.85);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 12px;
}

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

.mobile-panel form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.88);
}

.mobile-panel input {
  padding: 12px 14px;
}

.mobile-panel button {
  padding: 0 18px;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  margin: 28px auto 64px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 42px;
  padding: 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-slide::before {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.8) 46%, rgba(15, 23, 42, 0.3) 100%);
  z-index: 1;
}

.hero-slide::after {
  background: radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.22), transparent 24rem);
  z-index: 2;
}

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

.hero-content,
.hero-poster {
  position: relative;
  z-index: 3;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  color: var(--amber-2);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 800px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
}

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.category-pills,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.hero-meta span,
.detail-meta span,
.category-pills span,
.card-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(148, 163, 184, 0.13);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
}

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

.hero-poster {
  justify-self: end;
  width: min(100%, 360px);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 72px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: var(--amber-2);
}

.section {
  margin: 0 0 64px;
}

.section-head,
.page-hero,
.detail-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-kicker {
  color: var(--amber-2);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2,
.page-hero h1 {
  margin: 5px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.section-desc,
.page-hero p,
.category-card p,
.detail-title p,
.rich-content p {
  color: var(--muted-2);
  line-height: 1.85;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 21px;
}

.category-card p {
  margin: 0;
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.84);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #020617;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-2);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title:hover {
  color: var(--amber-2);
}

.card-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  height: 64px;
  margin: 10px 0 13px;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card-compact .card-desc {
  height: 44px;
  -webkit-line-clamp: 2;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 70px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  font-weight: 950;
}

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

.rank-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  margin-top: 36px;
  padding: 38px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.18), transparent 23rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.95));
  box-shadow: var(--shadow);
}

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

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

.filter-bar,
.search-box {
  display: flex;
  gap: 12px;
  margin: 0 0 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-input,
.search-box input {
  min-height: 46px;
  padding: 0 16px;
}

.search-box button {
  min-width: 96px;
  border-radius: 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin-bottom: 38px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.detail-title {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.75);
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
}

.detail-title p {
  margin: 20px 0 22px;
  font-size: 17px;
}

.player-section,
.rich-content,
.related-section {
  margin-bottom: 48px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-play span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.35);
  font-size: 34px;
}

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

.rich-content {
  display: grid;
  gap: 22px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.rich-content h2,
.related-section h2 {
  margin: 0;
  font-size: 28px;
}

.rich-content p {
  margin: 0;
  font-size: 16px;
}

.search-results-empty {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted-2);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo strong {
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 18px;
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }

  .nav-search {
    margin-left: auto;
    width: min(420px, 42vw);
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-slide {
    grid-template-columns: 1fr 280px;
    padding: 48px;
  }

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

@media (max-width: 900px) {
  .nav-search {
    display: none;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 24px 78px;
  }

  .hero-poster {
    justify-self: start;
    width: 190px;
    transform: rotate(0deg);
  }

  .hero-dots {
    left: 24px;
  }

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

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

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

@media (max-width: 640px) {
  main,
  .nav-wrap,
  .mobile-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy em {
    display: none;
  }

  .hero-slider {
    min-height: 700px;
    margin-top: 16px;
    border-radius: 22px;
  }

  .hero-content p {
    font-size: 16px;
  }

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

  .category-card,
  .page-hero,
  .detail-title,
  .rich-content {
    padding: 20px;
    border-radius: 22px;
  }

  .card-body {
    padding: 13px;
  }

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

  .rank-item img {
    width: 58px;
    height: 78px;
  }

  .filter-bar,
  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 44px;
  }
}
