:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(30, 41, 59, 0.58);
  --panel-strong: rgba(15, 23, 42, 0.82);
  --border: rgba(126, 34, 206, 0.34);
  --border-hot: rgba(251, 191, 36, 0.5);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --dim: #64748b;
  --amber: #f59e0b;
  --amber-soft: #fde68a;
  --purple: #7e22ce;
  --purple-deep: #581c87;
  --shadow: 0 20px 60px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(126, 34, 206, 0.24), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #0f172a 24%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.95), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
  font-size: 18px;
  flex: 0 0 auto;
}

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

.brand-name {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 4px;
  background: #e5e7eb;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 16px 16px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.44);
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 900ms ease;
  pointer-events: none;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.2)),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.72) 24%, transparent 72%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
}

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

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

.hero-kicker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-size: 14px;
}

.hero-copy h1,
.page-hero h1,
.watch-info h1 {
  margin: 0 0 18px;
  color: #fff;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(42px, 6vw, 72px);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.card-genre,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: rgba(126, 34, 206, 0.28);
  color: #d8b4fe;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 18px 0 28px;
  color: #cbd5e1;
}

.hero-meta span:first-child {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.14);
  border-radius: 10px;
  padding: 7px 12px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-link,
.top-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.top-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.38);
}

.ghost-button,
.section-link,
.top-button {
  color: #fde68a;
  background: rgba(88, 28, 135, 0.35);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 42px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 18px;
  transform: translateY(-50%);
}

.hero-next {
  right: 18px;
  transform: translateY(-50%);
}

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

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

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

.home-search-card,
.page-hero,
.filter-panel,
.content-card,
.category-card,
.watch-info,
.player-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.64), rgba(15, 23, 42, 0.72));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.home-search-card {
  position: relative;
  z-index: 5;
  margin-top: -36px;
  padding: 28px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-search-card h2,
.section-title h2,
.footer-list,
.footer-about p,
.home-search-card p {
  margin: 0;
}

.home-search-card h2 {
  font-size: clamp(22px, 3vw, 34px);
  color: #fde68a;
  margin-bottom: 8px;
}

.home-search-card p,
.section-title p,
.page-hero p,
.filter-heading p,
.category-card p,
.watch-info p,
.content-card p,
.footer-about p {
  color: var(--muted);
  line-height: 1.8;
}

.page-stack {
  display: grid;
  gap: 68px;
  padding: 64px 0 0;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

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

.section-title h2 {
  color: #fde68a;
  font-size: clamp(26px, 3vw, 38px);
}

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

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

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

.movie-card {
  display: block;
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.58), rgba(15, 23, 42, 0.72));
  border: 1px solid var(--border);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hot);
  box-shadow: 0 24px 52px rgba(245, 158, 11, 0.12);
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.68), rgba(30, 41, 59, 0.82));
}

.movie-card.is-hidden {
  display: none;
}

.movie-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.card-cover {
  position: relative;
  display: block;
  height: 270px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
}

.movie-card-large .card-cover {
  height: 420px;
}

.card-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.3s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
  filter: saturate(1.08) brightness(1.02);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
  transition: opacity 0.3s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  color: #fff;
  background: rgba(126, 34, 206, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: #fef3c7;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

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

.card-meta {
  gap: 8px;
  margin-bottom: 10px;
}

.card-meta span {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px 8px;
}

.card-genre {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  align-items: stretch;
}

.horizontal-cover {
  height: 130px;
}

.movie-card-horizontal .card-body h3 {
  -webkit-line-clamp: 1;
}

.movie-card-horizontal .card-body p {
  min-height: 0;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.rank-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px;
}

.rank-number {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-weight: 900;
}

.inner-page {
  padding-top: 40px;
}

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

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

.page-hero {
  border-radius: 26px;
  padding: clamp(30px, 6vw, 58px);
  margin-bottom: 34px;
  position: relative;
  overflow: hidden;
}

.page-hero::before,
.filter-panel::before,
.watch-layout::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 26rem);
  pointer-events: none;
}

.small-hero h1 {
  font-size: clamp(32px, 4vw, 54px);
}

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

.category-card {
  border-radius: 22px;
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hot);
}

.category-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  margin-bottom: 18px;
}

.category-card h2 {
  margin: 0 0 12px;
  color: #fde68a;
}

.category-card p {
  margin: 0 0 18px;
}

.category-samples {
  display: grid;
  gap: 8px;
}

.category-samples a {
  display: block;
  color: #cbd5e1;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.filter-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  margin: 0 0 30px;
}

.filter-heading,
.filter-controls,
.js-card-grid,
.no-results {
  position: relative;
}

.filter-heading h2 {
  margin: 0 0 8px;
  color: #fde68a;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 700;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  color: #e5e7eb;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--border-hot);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.no-results {
  display: none;
  margin: 20px 0 0;
  padding: 18px;
  border-radius: 16px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

.no-results.is-visible {
  display: block;
}

.watch-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 24px;
  margin-bottom: 34px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(0, 0, 0, 0.66));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-orb {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
  font-size: 30px;
}

.player-state {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  color: #fecaca;
  font-weight: 700;
}

.watch-info {
  border-radius: 24px;
  padding: 28px;
  align-self: stretch;
}

.watch-info h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.watch-info p {
  margin-bottom: 18px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 56px;
}

.content-card {
  border-radius: 22px;
  padding: 28px;
}

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

.content-card p {
  margin: 0;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0 34px;
}

.footer-brand {
  margin-bottom: 18px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fde68a;
  font-size: 18px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  color: var(--dim);
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 1024px) {
  .cards-grid,
  .compact-grid,
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .brand-name {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 92px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    top: auto;
    bottom: 26px;
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  .hero-prev {
    left: 16px;
    transform: none;
  }

  .hero-next {
    right: 16px;
    transform: none;
  }

  .hero-arrow:hover {
    transform: scale(1.04);
  }

  .home-search-card {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .movie-card-large {
    grid-column: span 2;
  }

  .movie-card-horizontal {
    grid-template-columns: 120px 1fr;
  }

  .horizontal-cover {
    height: 150px;
  }

  .rank-list li {
    grid-template-columns: 44px 1fr;
    gap: 10px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .brand-subtitle {
    display: none;
  }

  .cards-grid,
  .compact-grid,
  .featured-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-large {
    grid-column: span 1;
  }

  .card-cover,
  .movie-card-large .card-cover {
    height: 260px;
  }

  .movie-card-horizontal {
    grid-template-columns: 1fr;
  }

  .horizontal-cover {
    height: 220px;
  }

  .rank-list li {
    grid-template-columns: 1fr;
  }

  .rank-number {
    margin-left: 4px;
  }

  .page-hero,
  .filter-panel,
  .watch-info,
  .content-card {
    padding: 22px;
  }
}
