:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --red: #ef4444;
  --blue: #38bdf8;
  --emerald: #10b981;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 10%, rgba(56, 189, 248, 0.12), transparent 24rem),
    linear-gradient(135deg, #020617, #0f172a 54%, #020617);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #fff;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 999px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-image,
.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image img {
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.2) 64%, rgba(2, 6, 23, 0.5));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 40px;
}

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

.hero-tags span,
.tag-list span,
.detail-meta-list span,
.ranking-meta span,
.card-meta span,
.card-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
  font-size: 13px;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 620px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions,
.detail-info .button {
  margin-top: 28px;
}

.button,
.quick-search button,
.search-page-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.quick-search button:hover,
.search-page-panel button:hover {
  transform: translateY(-2px);
}

.button.primary,
.quick-search button,
.search-page-panel button {
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #fff;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.25);
}

.button.ghost {
  margin-left: 10px;
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(148, 163, 184, 0.2);
  color: #fff;
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 48px;
  display: flex;
  gap: 12px;
  z-index: 5;
}

.hero-controls button,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(14px);
}

.hero-controls button {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 30px;
}

.hero-controls button:hover,
.hero-dot.is-active {
  background: var(--amber);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 56px;
  display: flex;
  gap: 9px;
  z-index: 5;
}

.hero-dot {
  width: 38px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
}

.home-search-panel,
.page-hero,
.filter-panel,
.search-page-panel,
.text-panel,
.rank-panel,
.player-section {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.home-search-panel {
  transform: translateY(-42px);
  position: relative;
  z-index: 6;
  padding: 28px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 24px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-search-panel h2,
.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 44px);
}

.home-search-panel p,
.page-hero p,
.text-panel p,
.category-card p,
.category-overview-card p,
.footer-grid p,
.ranking-body p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-search,
.search-page-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quick-search input,
.search-page-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  outline: none;
}

.quick-search input:focus,
.search-page-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.page-stack {
  display: grid;
  gap: 70px;
  padding-bottom: 80px;
}

.content-section {
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.section-title.compact {
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
}

.title-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-weight: 900;
}

.title-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, rgba(148, 163, 184, 0.28), transparent);
}

.from-red {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.from-amber {
  background: linear-gradient(135deg, #f59e0b, #eab308);
}

.from-blue {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.from-pink {
  background: linear-gradient(135deg, #ec4899, #fb7185);
}

.from-emerald {
  background: linear-gradient(135deg, #10b981, #14b8a6);
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.92));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover,
.ranking-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.cover-box,
.cover-box img {
  width: 100%;
  height: 100%;
}

.cover-box {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.32), transparent 36%),
    linear-gradient(135deg, #1e293b, #020617);
}

.cover-box img {
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.cover-box.is-missing img {
  opacity: 0;
}

.cover-box.is-missing::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.88);
}

.movie-card:hover .cover-box img,
.ranking-card:hover .cover-box img {
  transform: scale(1.08);
}

.play-badge,
.score-badge,
.ranking-number {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.play-badge {
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  background: var(--amber);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

.score-badge {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.movie-card h3,
.ranking-body h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.36;
}

.movie-card h3 a:hover,
.ranking-body h2 a:hover,
.rank-title:hover {
  color: var(--amber);
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list span {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.tag-list.big span {
  font-size: 14px;
}

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

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong {
  font-size: 20px;
}

.category-card span,
.category-overview-card span {
  color: var(--amber);
  font-weight: 800;
}

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.rank-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  font-weight: 900;
}

.rank-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-info {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}

.page-shell {
  padding: 44px 0 80px;
}

.page-hero {
  padding: 34px;
  margin-bottom: 34px;
}

.page-hero.small {
  min-height: auto;
}

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

.category-overview-card {
  grid-template-columns: 220px 1fr;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

.category-overview-card .cover-box {
  aspect-ratio: 16 / 10;
}

.category-overview-card div:last-child {
  padding: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  padding: 18px;
  margin-bottom: 26px;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.ranking-number {
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), #ef4444);
}

.ranking-body {
  align-self: center;
}

.search-page-panel {
  padding: 18px;
  margin-bottom: 30px;
}

.search-results {
  display: grid;
  gap: 14px;
}

.search-result-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.search-result-card h2 {
  margin: 0;
  font-size: 20px;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-page {
  min-height: 100vh;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 54px 0 70px;
}

.detail-backdrop,
.detail-backdrop img,
.detail-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-backdrop img {
  object-fit: cover;
  filter: blur(8px);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-shade {
  background:
    linear-gradient(to top, #020617, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.92)),
    linear-gradient(to right, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42));
}

.detail-hero-inner {
  position: relative;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 34px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
}

.detail-info .lead {
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta-list {
  margin: 22px 0;
}

.detail-content {
  margin-top: -30px;
  position: relative;
  z-index: 2;
}

.player-section,
.text-panel {
  padding: 24px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2), rgba(2, 6, 23, 0.62));
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  font-size: 34px;
  box-shadow: 0 20px 42px rgba(245, 158, 11, 0.3);
}

.player-overlay strong {
  margin-top: -18px;
  font-size: 18px;
}

.video-player.is-playing .player-overlay {
  display: none;
}

.text-panel h2 {
  margin-top: 0;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links strong {
  color: #fff;
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--muted);
}

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

[hidden],
.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .grid-4,
  .grid-3,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout,
  .home-search-panel,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: 72px 12px auto 12px;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

  body.menu-open .main-nav {
    display: flex;
  }

  .main-nav a {
    border-radius: 12px;
  }

  .hero {
    min-height: 640px;
  }

  .hero-controls {
    right: 16px;
    bottom: 26px;
  }

  .hero-dots {
    left: 16px;
    bottom: 40px;
  }

  .hero-copy {
    padding-top: 70px;
  }

  .button.ghost {
    margin-left: 0;
    margin-top: 10px;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
  }

  .home-search-panel {
    transform: none;
    margin-top: 18px;
  }

  .quick-search,
  .search-page-panel,
  .filter-panel,
  .ranking-card,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .grid-4,
  .grid-3,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .page-stack {
    gap: 44px;
  }

  .ranking-cover {
    aspect-ratio: 16 / 9;
  }

  .detail-grid {
    gap: 24px;
  }

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