:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #111827;
  --line: rgba(147, 51, 234, 0.28);
  --line-strong: rgba(251, 191, 36, 0.38);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #fbbf24;
  --amber-deep: #d97706;
  --purple: #7e22ce;
  --purple-soft: #c084fc;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(126, 34, 206, 0.24), transparent 36rem),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.12), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

main {
  min-height: 68vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #1f1300;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
}

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

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

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

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

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.mobile-nav.open {
  display: flex;
}

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

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

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.68) 45%, rgba(15, 23, 42, 0.12) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.38) 58%, rgba(2, 6, 23, 0.16) 100%);
}

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

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 18px var(--amber);
}

.hero h1 {
  margin: 12px 0 18px;
  max-width: 820px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #dbe4ef;
  font-size: 19px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.primary-button,
.home-search button,
.search-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 12px 22px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.home-search button:hover,
.search-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.42);
}

.hero .primary-button {
  margin-top: 26px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: white;
  font-size: 42px;
  background: rgba(0, 0, 0, 0.46);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-arrow.left {
  left: 22px;
  transform: translateY(-50%);
}

.hero-arrow.right {
  right: 22px;
  transform: translateY(-50%);
}

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

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

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

.page-stack {
  display: grid;
  gap: 56px;
  padding: 56px 0 20px;
}

.content-section,
.text-panel,
.player-section,
.search-box-page {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.54);
  box-shadow: var(--shadow);
}

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

.section-heading h2,
.text-panel h2 {
  margin: 6px 0 0;
  color: #fffbeb;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.section-heading a {
  color: var(--amber);
  font-weight: 900;
}

.rail {
  display: flex;
  gap: 18px;
  margin: 0 -24px;
  padding: 0 24px 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.rail .movie-card {
  width: 310px;
  flex: 0 0 310px;
  scroll-snap-align: start;
}

.grid {
  display: grid;
  gap: 20px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(126, 34, 206, 0.22);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.36);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(251, 191, 36, 0.08);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.7), rgba(15, 23, 42, 0.9));
}

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

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fff7ed;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.rank-num {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #1f1300;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.32);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  color: #fff7ed;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--amber);
}

.card-meta,
.card-desc,
.ranking-meta {
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 3px 8px;
  font-size: 11px;
}

.search-panel-home {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: center;
  gap: 28px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(88, 28, 135, 0.34), rgba(15, 23, 42, 0.78));
}

.search-panel-home h2 {
  margin: 6px 0 8px;
  font-size: clamp(24px, 4vw, 36px);
}

.search-panel-home p {
  color: var(--soft);
  margin: 0;
}

.home-search,
.search-controls {
  display: flex;
  gap: 12px;
}

.home-search input,
.search-controls input,
.search-controls select {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.62);
}

.home-search input {
  flex: 1;
}

.home-search input:focus,
.search-controls input:focus,
.search-controls select:focus {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.page-index-links,
.cloud-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-index-links a,
.cloud-links a,
.pagination a,
.pagination strong,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 13px;
  padding: 0 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.66);
}

.page-index-links a:hover,
.cloud-links a:hover,
.pagination a:hover,
.pagination strong {
  border-color: rgba(251, 191, 36, 0.45);
  color: #1f1300;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.sub-hero {
  padding: 74px 0 62px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(88, 28, 135, 0.42), rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at 18% 10%, rgba(251, 191, 36, 0.16), transparent 24rem);
}

.sub-hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.1;
}

.sub-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

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

.category-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.tile-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 180px;
  overflow: hidden;
}

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

.tile-copy {
  padding: 22px;
}

.tile-copy h2 {
  margin: 0 0 6px;
  color: #fffbeb;
}

.tile-copy p {
  margin: 0;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.64);
}

.ranking-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: rgba(88, 28, 135, 0.26);
}

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

.ranking-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fffbeb;
  font-size: 20px;
  font-weight: 900;
}

.ranking-title span {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.ranking-content p {
  margin: 8px 0;
  color: var(--soft);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.86)),
    linear-gradient(0deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.28)),
    var(--cover);
  background-size: cover;
  background-position: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: 42px;
  align-items: center;
  padding: 64px 0;
}

.detail-poster-wrap {
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 26px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.48);
  box-shadow: var(--shadow);
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(88, 28, 135, 0.28);
}

.detail-info h1 {
  margin: 12px 0 12px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 840px;
  margin: 0 0 20px;
  color: #e2e8f0;
  font-size: 20px;
}

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

.detail-meta span {
  color: #e9d5ff;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: white;
  font-size: 18px;
  font-weight: 900;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #1f1300;
  font-size: 32px;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 20px 58px rgba(245, 158, 11, 0.36);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #f8fafc;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.52);
}

.player-status:empty {
  display: none;
}

.text-panel h2 {
  margin-bottom: 12px;
}

.text-panel p {
  margin: 0;
  color: #dbe4ef;
  font-size: 18px;
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  margin-bottom: 18px;
}

.search-result-meta {
  margin-bottom: 18px;
  color: var(--muted);
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-brand {
  margin-bottom: 4px;
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.back-top {
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.08);
}

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

  .menu-button {
    display: grid;
    place-items: center;
  }

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

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

  .detail-poster-wrap {
    width: min(320px, 100%);
  }
}

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

  .hero {
    min-height: 640px;
  }

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

  .hero p,
  .detail-one-line,
  .text-panel p {
    font-size: 16px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
    font-size: 32px;
  }

  .four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .content-section,
  .text-panel,
  .player-section,
  .search-box-page {
    border-radius: 18px;
    padding: 16px;
  }

  .rail {
    margin: 0 -16px;
    padding: 0 16px 16px;
  }

  .rail .movie-card {
    width: 260px;
    flex-basis: 260px;
  }

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-search,
  .search-controls {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .ranking-title {
    font-size: 17px;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 20px;
  }

  .brand-subtitle {
    display: none;
  }

  .four-col {
    grid-template-columns: 1fr;
  }

  .small-card .poster-link {
    aspect-ratio: 16 / 10;
  }

  .tile-images {
    height: 130px;
  }

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