:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #1e293b;
  --bg-card-2: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-dark: #d97706;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #020617 42%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.footer-inner,
.section-inner,
.page-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
  color: #111827;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  color: #ffffff;
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-nav-link {
  color: var(--text-muted);
  font-weight: 650;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 8px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.1);
}

.header-search,
.mobile-search,
.search-hero-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-hero-form input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.88);
  color: #ffffff;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-hero-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button,
.search-hero-form button,
.primary-button,
.secondary-button,
.control-button,
.player-play-button {
  border: 0;
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.search-hero-form button,
.primary-button {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 10px 14px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero-form button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.secondary-button:hover {
  color: var(--amber-light);
  background: rgba(15, 23, 42, 0.9);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.92);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

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

.mobile-panel.open {
  display: block;
}

.mobile-search input {
  width: 100%;
}

.mobile-nav {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.mobile-nav-link {
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-track {
  position: relative;
  height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06);
}

.hero-slide.active .hero-bg {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.12) 54%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding-bottom: 92px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  font-weight: 800;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--amber-light) 0 38%, rgba(245, 158, 11, 0.18) 40% 100%);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-description {
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
  max-width: 690px;
}

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

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.control-button {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  pointer-events: auto;
  transition: background 0.2s ease, transform 0.2s ease;
}

.control-button:hover {
  background: rgba(2, 6, 23, 0.84);
  transform: translateY(-1px);
}

.control-button.prev {
  left: max(18px, calc((100% - var(--container)) / 2 - 62px));
}

.control-button.next {
  right: max(18px, calc((100% - var(--container)) / 2 - 62px));
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: auto;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.main-section,
.page-section {
  padding: 64px 0;
}

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

.section-kicker {
  display: inline-flex;
  color: var(--amber-light);
  font-weight: 800;
  margin-bottom: 8px;
}

.section-header h2,
.page-header h1,
.detail-title h1,
.search-hero h1 {
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.section-header h2,
.page-header h1,
.search-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.section-header p,
.page-header p,
.search-hero p {
  margin: 8px 0 0;
  color: var(--text-muted);
  max-width: 680px;
}

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

.movie-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  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.4);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(2, 6, 23, 0.9));
}

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

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

.rating-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
}

.rating-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  background: rgba(245, 158, 11, 0.94);
  color: #111827;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.card-meta {
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 8px;
}

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

.movie-card-title {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-title a:hover,
.ranking-info h3 a:hover,
.related-list a:hover,
.breadcrumb a:hover {
  color: var(--amber-light);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 3px 8px;
  color: #dbeafe;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  font-size: 12px;
}

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

.category-card {
  overflow: hidden;
  min-height: 280px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 142px;
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-body {
  padding: 20px;
}

.category-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-body p {
  min-height: 52px;
  margin: 0 0 16px;
  color: var(--text-muted);
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 86px 56px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: rgba(30, 41, 59, 0.68);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.ranking-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

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

.ranking-rank {
  color: var(--amber-light);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ranking-info h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.ranking-meta {
  color: var(--text-soft);
  font-size: 14px;
}

.ranking-meta strong {
  color: var(--amber-light);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 14px;
}

.empty-state {
  display: none;
  padding: 26px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.empty-state.show {
  display: block;
}

.breadcrumb {
  width: min(100% - 32px, var(--container));
  margin: 26px auto 0;
  color: var(--text-soft);
  font-size: 14px;
}

.breadcrumb span {
  color: #ffffff;
}

.detail-hero {
  padding: 36px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-panel,
.content-panel,
.related-panel,
.search-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.38);
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

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

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.78));
}

.player-play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  padding-left: 6px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber));
  border-radius: 999px;
  box-shadow: 0 22px 52px rgba(245, 158, 11, 0.36);
  font-size: 36px;
}

.player-caption {
  padding: 18px 22px;
}

.player-caption h1 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
}

.player-caption p {
  margin: 0;
  color: var(--text-muted);
}

.detail-panel,
.content-panel,
.related-panel,
.search-panel {
  padding: 24px;
}

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.8);
}

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

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

.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat-box {
  padding: 14px;
  background: rgba(30, 41, 59, 0.72);
  border-radius: 14px;
}

.stat-box strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
}

.stat-box span {
  color: var(--text-soft);
  font-size: 13px;
}

.content-panel {
  margin-top: 30px;
}

.content-panel h2,
.related-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 24px;
}

.content-panel p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 16px;
}

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

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

.related-list {
  display: grid;
  gap: 10px;
}

.related-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.search-hero {
  padding: 72px 0 38px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0));
}

.search-hero-form {
  width: min(720px, 100%);
  margin-top: 22px;
}

.search-hero-form input {
  flex: 1;
  padding: 15px 16px;
}

.search-hero-form button {
  padding: 15px 22px;
}

.search-panel {
  margin-bottom: 54px;
}

.site-footer {
  margin-top: 60px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), #020617);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  padding: 42px 0;
}

.footer-brand p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
}

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

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

.footer-copy {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--text-soft);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

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

  .detail-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero,
  .hero-track {
    min-height: 560px;
    height: 560px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .control-button {
    top: auto;
    bottom: 28px;
    width: 40px;
    height: 40px;
  }

  .control-button.prev {
    left: 16px;
  }

  .control-button.next {
    right: 16px;
  }

  .hero-dots {
    bottom: 42px;
  }

  .section-header,
  .page-header {
    display: block;
  }

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

  .ranking-item {
    grid-template-columns: 74px 44px 1fr;
    gap: 12px;
  }

  .ranking-info p {
    display: none;
  }

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

  .detail-panel {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .footer-inner,
  .section-inner,
  .page-inner,
  .breadcrumb {
    width: min(100% - 24px, var(--container));
  }

  .hero h1,
  .hero h2 {
    font-size: 34px;
  }

  .hero-description {
    font-size: 16px;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    display: grid;
    grid-template-columns: 112px 1fr;
  }

  .movie-card.compact .poster-link {
    aspect-ratio: 2 / 3;
  }

  .ranking-item {
    grid-template-columns: 68px 1fr;
  }

  .ranking-rank {
    display: none;
  }

  .search-hero-form {
    display: grid;
  }
}
