:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --danger: #fb7185;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.18), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(59, 130, 246, 0.16), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

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

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #f59e0b, #f97316 48%, #fde68a);
  color: #0f172a;
  font-weight: 900;
  box-shadow: 0 0 38px rgba(245, 158, 11, 0.42);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fef3c7);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

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

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

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 660px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 22px 0;
}

.hero-orbit {
  position: absolute;
  inset: 10% -18% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 62%);
  filter: blur(8px);
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 28px 22px 0;
  min-height: 590px;
  overflow: hidden;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111827;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) brightness(0.66);
  transform: scale(1.06);
}

.hero-slide::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 45%, rgba(2, 6, 23, 0.42)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent 58%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  align-items: center;
  gap: 44px;
  padding: 72px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 46px);
  color: #fde68a;
}

.hero-copy p,
.page-hero p,
.detail-info .lead-text {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-tags,
.detail-meta,
.meta-row,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button,
.ghost-link,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.primary-button,
.home-search button {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.ghost-button,
.ghost-link {
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.primary-button:hover,
.ghost-button:hover,
.ghost-link:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.28);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

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

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

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

.hero-dot.active {
  width: 54px;
  background: var(--accent-2);
}

.quick-search,
.search-panel {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 22px 0;
}

.home-search,
.search-panel {
  display: flex;
  gap: 12px;
}

.home-search input,
.search-panel input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  outline: none;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.content-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 58px 22px 0;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.78));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img {
  transform: scale(1.08);
}

.poster-link::after,
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 55%);
}

.play-glow,
.player-start {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.35);
}

.play-glow {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.duration {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.card-body {
  padding: 16px;
}

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

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

.card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 10px 0 12px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row,
.tag-row {
  color: #cbd5e1;
  font-size: 13px;
}

.meta-row span:first-child {
  color: #fbbf24;
  font-weight: 900;
}

.tag-row a,
.tag-row span {
  color: #cbd5e1;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.06);
}

.compact-card .poster-link {
  aspect-ratio: 16 / 9;
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 178px;
  align-content: end;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 18px;
  background: #0f172a;
}

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

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 2;
}

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

.category-tile em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.5;
}

.page-hero,
.detail-hero {
  position: relative;
  max-width: 1440px;
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 72px;
  background:
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82));
}

.slim-hero {
  min-height: 270px;
}

.rank-hero {
  min-height: 300px;
}

.detail-hero {
  min-height: 580px;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  padding: 72px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  aspect-ratio: 3 / 4;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.detail-meta,
.detail-tags {
  margin-top: 16px;
}

.player-section {
  max-width: 1180px;
  margin: 42px auto 0;
  padding: 0 22px;
}

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

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

.player-start {
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  border: 0;
  font-size: 30px;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.player-card.is-playing .player-start {
  display: none;
}

.detail-content {
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.story-card h2 {
  margin: 0 0 14px;
  color: #fde68a;
}

.story-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.9;
}

.site-footer {
  max-width: 1440px;
  margin: 70px auto 0;
  padding: 42px 22px 34px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 34px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 900;
  color: #fde68a;
}

.site-footer p,
.copyright {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: var(--accent-2);
}

.copyright {
  margin-top: 34px;
  font-size: 13px;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 310px;
    padding: 52px;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    min-height: 700px;
  }

  .hero-content,
  .detail-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 310px;
  }

  .movie-grid,
  .category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-hero {
    margin-left: 22px;
    margin-right: 22px;
    padding: 42px 28px;
  }
}

@media (max-width: 620px) {
  .brand-text em {
    display: none;
  }

  .hero,
  .quick-search,
  .content-section,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-slide {
    left: 16px;
    right: 16px;
    border-radius: 24px;
  }

  .home-search {
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero,
  .detail-hero {
    margin-left: 16px;
    margin-right: 16px;
    border-radius: 24px;
  }

  .detail-wrap {
    padding: 28px;
  }
}
