:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500), var(--amber-600));
  box-shadow: 0 16px 38px rgba(217, 119, 6, 0.28);
}

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand {
  flex: 0 0 auto;
  color: var(--white);
  font-size: 25px;
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a {
  color: var(--white);
  font-weight: 700;
  opacity: 0.94;
  transition: color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.desktop-nav a:hover {
  color: var(--amber-100);
  opacity: 1;
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input {
  width: 210px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.ghost-btn,
.player-button,
.filter-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search button {
  padding: 10px 15px;
  color: var(--amber-700, #92400e);
  background: var(--white);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  font-size: 24px;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-nav a {
  display: block;
  color: var(--white);
  padding: 10px 0;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero {
  position: relative;
  min-height: 720px;
  margin-top: 68px;
  color: var(--white);
  overflow: hidden;
  background: radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.35), transparent 30%), linear-gradient(135deg, var(--slate-950), var(--slate-900) 42%, #451a03);
}

.hero-slider,
.hero-slide,
.hero-bg,
.hero-dim {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.08);
  opacity: 0.42;
}

.hero-dim {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.32) 100%),
    radial-gradient(circle at 75% 24%, rgba(245, 158, 11, 0.28), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 720px;
  margin: 0 auto;
  padding: 86px 22px 68px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 420px;
  align-items: center;
  gap: 46px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--amber-100);
  background: rgba(245, 158, 11, 0.18);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.32);
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.03;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.88);
}

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

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

.primary-btn {
  color: var(--amber-700, #92400e);
  background: var(--white);
  box-shadow: 0 14px 32px rgba(255, 255, 255, 0.2);
}

.secondary-btn {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.25);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.player-button:hover,
.nav-search button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-panel {
  position: relative;
  border-radius: 34px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.hero-panel-info {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.86));
  color: var(--white);
}

.hero-panel-info strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.hero-panel-info span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--amber-400);
}

.main-section,
.page-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 66px 22px;
}

.page-section.first {
  padding-top: 118px;
}

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

.section-head h2,
.section-head h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.section-head p,
.page-hero p {
  margin: 12px 0 0;
  max-width: 760px;
  color: var(--gray-500);
}

.alt-band {
  background: linear-gradient(120deg, var(--amber-50), #fff7ed);
}

.dark-band {
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
  color: var(--white);
}

.dark-band .section-head p,
.dark-band .card-meta,
.dark-band .card-desc {
  color: rgba(255, 255, 255, 0.72);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
}

.type-badge,
.rank-mark,
.play-badge {
  position: absolute;
  z-index: 2;
}

.type-badge {
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--white);
  background: rgba(245, 158, 11, 0.92);
}

.rank-mark {
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  color: var(--slate-950);
  background: var(--amber-300);
}

.play-badge {
  left: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--amber-600);
  background: rgba(255, 255, 255, 0.95);
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-content h3 a:hover {
  color: var(--amber-600);
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}

.card-desc {
  margin-top: 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  color: var(--amber-700, #92400e);
  background: var(--amber-100);
}

.wide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 28px;
}

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

.compact-rank {
  display: grid;
  grid-template-columns: 38px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-rank:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.compact-rank strong {
  color: var(--amber-600);
  font-size: 20px;
  text-align: center;
}

.compact-rank img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-rank b,
.compact-rank em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-rank em {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--slate-900);
  box-shadow: var(--soft-shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-layer {
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

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

.category-tile strong {
  font-size: 24px;
  line-height: 1.2;
}

.category-tile em {
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 126px 22px 40px;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 44px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 10%, rgba(251, 191, 36, 0.32), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  box-shadow: var(--shadow);
}

.page-hero-card p {
  color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
  max-width: 1240px;
  margin: 0 auto 30px;
  padding: 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--white);
  outline: 0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(420px, 100%);
}

.filter-search span {
  font-weight: 800;
  color: var(--gray-700);
}

.filter-search input {
  flex: 1 1 auto;
}

.detail-page {
  padding-top: 112px;
}

.detail-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 66px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--amber-600);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: var(--slate-950);
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.player-button {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--amber-600);
  background: rgba(255, 255, 255, 0.96);
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.player-shell.is-started .player-cover {
  display: none;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--white);
  background: rgba(127, 29, 29, 0.86);
}

.player-error.is-visible {
  display: block;
}

.detail-card,
.side-card,
.text-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 700;
  font-size: 14px;
}

.detail-summary,
.detail-review {
  margin-top: 24px;
}

.detail-summary h2,
.detail-review h2,
.related-block h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-summary p,
.detail-review p {
  margin: 0;
  color: var(--gray-700);
  white-space: pre-line;
}

.side-card {
  padding: 18px;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  background: var(--slate-900);
}

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

.side-card .tag-row {
  margin-bottom: 18px;
}

.related-block {
  margin-top: 30px;
}

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

.hidden {
  display: none !important;
}

.empty-state {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px 80px;
  text-align: center;
  color: var(--gray-500);
}

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-search {
    margin-left: auto;
  }

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

  .hero-panel {
    max-width: 430px;
  }

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

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  .brand {
    font-size: 21px;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

  .nav-search input {
    flex: 1 1 auto;
    width: 100%;
  }

  .hero {
    margin-top: 112px;
    min-height: 760px;
  }

  .hero-content {
    min-height: 760px;
    padding-top: 48px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-panel {
    display: none;
  }

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

  .main-section,
  .page-section {
    padding: 46px 16px;
  }

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

  .page-hero-card {
    padding: 30px 22px;
    border-radius: 24px;
  }

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

  .card-content {
    padding: 13px;
  }

  .card-content h3 {
    font-size: 16px;
  }

  .filter-panel {
    padding: 0 16px;
  }

  .filter-panel input,
  .filter-panel select,
  .filter-search {
    width: 100%;
  }

  .detail-page {
    padding-top: 138px;
  }

  .detail-wrap {
    padding: 0 16px 46px;
  }
}

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

  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }
}
