:root {
  color-scheme: dark;
  --bg-start: #020617;
  --bg-mid: #172554;
  --bg-end: #020617;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --blue: #2563eb;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.22), transparent 30rem),
    linear-gradient(180deg, var(--bg-start), var(--bg-mid), var(--bg-end));
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.88), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.36);
}

.brand-text {
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

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

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--amber-light);
}

.mobile-menu-button {
  display: none;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

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

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.36)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 50%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 142px;
  width: min(720px, calc(100% - 48px));
  z-index: 3;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber-light);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.54);
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.75;
}

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

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

.hero-tags span,
.detail-meta span,
.movie-meta-row span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.62);
}

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

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

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, var(--amber));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.secondary-button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 94px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.42);
  cursor: pointer;
}

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

.hero-thumbs {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 40px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, 92px);
  gap: 12px;
}

.hero-thumb {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

.hero-thumb span {
  display: block;
  padding: 8px;
  font-size: 0.74rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-search-block,
.content-section,
.category-overview-block,
.page-hero,
.detail-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.36));
  box-shadow: var(--shadow);
}

.quick-search-block h2,
.section-heading h2,
.category-overview-block h2,
.detail-panel h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.quick-search-block p,
.section-heading p,
.category-overview-block p,
.page-hero p,
.detail-panel p {
  color: var(--muted);
  line-height: 1.78;
}

.content-section,
.category-overview-block {
  margin-top: 56px;
}

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

.text-link {
  color: var(--amber-light);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.44);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.36);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 52%);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.year-badge {
  left: 10px;
  color: #111827;
  background: #fcd34d;
}

.rank-badge {
  right: 10px;
  color: #f8fafc;
  background: rgba(239, 68, 68, 0.9);
}

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

.movie-title {
  display: block;
  min-height: 48px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  transition: color 0.2s ease;
}

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

.movie-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.88rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta-row {
  gap: 6px;
}

.movie-meta-row span {
  min-height: 24px;
  padding: 3px 8px;
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.2);
  font-size: 0.76rem;
  background: rgba(30, 41, 59, 0.84);
}

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

.category-tile {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.26));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.46);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-tile strong {
  color: var(--text);
  font-size: 1.18rem;
}

.category-tile span {
  color: var(--amber-light);
  font-weight: 800;
}

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

.page-main {
  padding-top: 42px;
}

.page-hero {
  position: relative;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 16%, rgba(245, 158, 11, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.46));
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.filter-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box {
  flex: 1;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.search-box input,
.filter-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.search-box input {
  padding: 0 14px;
}

.filter-select {
  padding: 0 12px;
}

.filter-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

.detail-main {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 0.94rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.3));
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info {
  align-self: center;
}

.detail-one-line {
  max-width: 860px;
  margin: 24px 0;
  color: #e2e8f0;
  font-size: 1.12rem;
  line-height: 1.78;
}

.detail-meta {
  margin-bottom: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-section {
  margin-top: 32px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.42), rgba(0, 0, 0, 0.78));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  font-size: 2rem;
  background: linear-gradient(135deg, #fde68a, var(--amber));
  box-shadow: 0 0 46px rgba(245, 158, 11, 0.38);
}

.player-overlay strong {
  font-size: 1.18rem;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.detail-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.7), rgba(15, 23, 42, 0.96));
  border-top: 1px solid var(--line);
}

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

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

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

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 12px;
    font-size: 0.86rem;
  }

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

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

  .hero-thumbs {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    bottom: 100px;
  }

  .quick-search-block,
  .section-heading,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-selects {
    grid-template-columns: 1fr;
  }

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

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

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

  .page-hero {
    padding: 28px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand-text {
    font-size: 1.18rem;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.03em;
  }

  .movie-grid,
  .small-grid {
    gap: 12px;
  }

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

  .movie-title {
    font-size: 0.94rem;
  }

  .quick-search-block,
  .content-section,
  .category-overview-block,
  .page-hero,
  .detail-main {
    width: min(100% - 24px, 1280px);
  }

  .play-circle {
    width: 64px;
    height: 64px;
  }
}
