:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(30, 41, 59, 0.92);
  --purple: #6d28d9;
  --purple-soft: rgba(109, 40, 217, 0.32);
  --amber: #f59e0b;
  --amber-bright: #fbbf24;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: rgba(147, 51, 234, 0.25);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(124, 58, 237, 0.28), transparent 36rem),
    radial-gradient(circle at 95% 10%, rgba(245, 158, 11, 0.14), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #020617 48%, #020617 100%);
  color: var(--text);
}

body.no-scroll {
  overflow: hidden;
}

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

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

img.image-error {
  opacity: 0;
}

button,
input {
  font: inherit;
}

.site-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.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

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

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

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

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

.brand-name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #fbbf24);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

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

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 14px;
}

.main-nav a {
  transition: color 0.22s ease, transform 0.22s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--amber-bright);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(15, 23, 42, 0.78);
  color: var(--amber-bright);
  border-radius: 12px;
  padding: 9px 12px;
}

.site-main {
  padding-bottom: 40px;
}

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

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72) 66%, #0f172a 100%);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.38) 54%, rgba(2, 6, 23, 0.18));
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-bright);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 16px 0;
  color: #ffffff;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  margin: 0 0 22px;
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta-line span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.primary-button,
.secondary-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-button {
  padding: 0 26px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.26);
}

.secondary-button,
.section-more {
  padding: 0 18px;
  color: var(--amber-bright);
  background: rgba(109, 40, 217, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.primary-button:hover,
.secondary-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.86);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 36px;
  background: var(--amber-bright);
}

.content-section {
  padding: 64px 0 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 8px 0 0;
  color: #fde68a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.8;
}

.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 {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.74));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.9), rgba(30, 41, 59, 0.82));
}

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.36), rgba(245, 158, 11, 0.18));
}

.movie-card figure img,
.detail-cover img,
.ranking-row img,
.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.movie-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  opacity: 0.72;
}

.movie-region {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(109, 40, 217, 0.8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.movie-play {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: auto;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

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

.movie-card p {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-tags span {
  padding: 5px 8px;
  border-radius: 8px;
  color: #d8b4fe;
  background: rgba(109, 40, 217, 0.28);
  font-size: 12px;
}

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

.movie-card.is-large figure {
  aspect-ratio: 16 / 11;
}

.movie-card.is-large h3 {
  font-size: 24px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.22), transparent 38%),
    linear-gradient(145deg, rgba(88, 28, 135, 0.72), rgba(15, 23, 42, 0.86));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.category-tile strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 8px;
}

.category-tile span {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 13px;
}

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

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

.category-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 140px;
  overflow: hidden;
  background: rgba(109, 40, 217, 0.24);
}

.category-panel-body {
  padding: 22px;
}

.category-panel h2,
.category-panel h3 {
  margin: 0 0 10px;
  color: #fde68a;
}

.category-panel p {
  color: var(--muted);
  line-height: 1.75;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 92px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(147, 51, 234, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(30, 41, 59, 0.86);
}

.rank-num {
  color: var(--amber-bright);
  font-weight: 900;
  font-size: 24px;
  text-align: center;
}

.ranking-row img {
  width: 92px;
  height: 64px;
  border-radius: 12px;
  background: rgba(109, 40, 217, 0.2);
}

.rank-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-copy strong {
  color: #fde68a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-hot {
  color: #111827;
  background: var(--amber-bright);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  font-size: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #d8b4fe;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 12%, rgba(251, 191, 36, 0.17), transparent 34%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  min-height: 260px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.36), rgba(245, 158, 11, 0.16));
}

.detail-copy h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-copy p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 17px;
}

.detail-tags,
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags span,
.tags-cloud span {
  color: #d8b4fe;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(109, 40, 217, 0.28);
  font-size: 13px;
}

.player-panel,
.text-panel {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

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

.player-head h2,
.text-panel h2 {
  margin: 0 0 10px;
  color: #fde68a;
  font-size: 26px;
}

.player-head p,
.text-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  position: relative;
  z-index: 1;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border: 0;
  background:
    radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72)),
    transparent;
  color: #111827;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-start span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.34);
  font-size: 28px;
}

.video-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.search-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  margin-bottom: 28px;
}

.search-panel input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 16px;
  padding: 0 18px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(251, 191, 36, 0.68);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.search-status {
  margin: 12px 0 0;
  color: var(--muted);
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pagination-links a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--amber-bright);
  background: rgba(109, 40, 217, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.info-page {
  max-width: 880px;
  margin: 0 auto;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.78);
  line-height: 1.9;
  color: #cbd5e1;
}

.info-card h2 {
  color: #fde68a;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--amber-bright);
  font-size: 17px;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

@media (max-width: 980px) {
  .main-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: grid;
  }

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

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

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

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

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

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

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

  .brand-subtitle {
    display: none;
  }

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

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

  .hero-arrow {
    display: none;
  }

  .section-heading {
    display: grid;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-strip,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.is-large {
    grid-column: auto;
    grid-row: auto;
  }

  .ranking-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-hot {
    display: none;
  }

  .ranking-row img {
    width: 72px;
    height: 54px;
  }

  .detail-hero {
    padding: 18px;
    border-radius: 22px;
  }
}
