:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.68);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --accent: #0284c7;
  --accent-light: #38bdf8;
  --accent-soft: rgba(14, 165, 233, 0.16);
  --gold: #f59e0b;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(14, 165, 233, 0.17), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.16), transparent 36%),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  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;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb 58%, #7c3aed);
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.34);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 24%, transparent 62%);
}

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

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

.hero-chip,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e0f2fe;
  background: rgba(2, 132, 199, 0.82);
  border: 1px solid rgba(125, 211, 252, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.hero-actions,
.hero-search,
.hero-mini-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-search {
  width: min(560px, 100%);
  margin-top: 18px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
}

.hero-search input {
  flex: 1 1 220px;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 12px 12px;
}

.hero-search button,
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-search button,
.btn-primary {
  color: white;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-search button:hover,
.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-mini-links {
  margin-top: 18px;
}

.hero-mini-links a {
  color: #bae6fd;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dot.active {
  width: 34px;
  background: white;
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.54);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

.main-space {
  padding: 54px 0 86px;
}

.section-block {
  margin-top: 68px;
}

.section-block:first-child {
  margin-top: 0;
}

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

.section-header h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.75;
}

.section-more {
  color: #7dd3fc;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-row-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x proximity;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 62%);
  opacity: 0.72;
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: auto;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.9);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.duration-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: white;
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-title {
  color: white;
  font-size: 17px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--subtle);
  font-size: 13px;
}

.score {
  color: var(--gold);
  font-weight: 800;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.card-tags span,
.tag-list span {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.movie-card-wide {
  flex-direction: row;
}

.movie-card-wide .poster-wrap {
  width: 42%;
  min-width: 220px;
  aspect-ratio: auto;
}

.movie-card-wide .poster-wrap img {
  min-height: 100%;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 186px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(30, 41, 59, 0.82)),
    rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.36);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-sample {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.category-sample img {
  width: 44px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.85;
  font-size: 17px;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.5);
}

.search-field input,
.filter-select {
  min-height: 46px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-field input {
  flex: 1;
  min-width: 0;
}

.filter-select {
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.5);
}

.filter-result {
  color: var(--muted);
  margin: -8px 0 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(15, 23, 42, 0.86);
}

.rank-number {
  color: #e0f2fe;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
}

.rank-main {
  min-width: 0;
}

.rank-main strong {
  display: block;
  color: white;
  font-size: 18px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-main em {
  display: block;
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-side {
  text-align: right;
  color: var(--muted);
}

.rank-side b {
  display: block;
  color: var(--gold);
  margin-bottom: 4px;
}

.detail-wrap {
  padding: 34px 0 88px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.36));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-box.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 24px 64px rgba(37, 99, 235, 0.4);
  font-size: 34px;
}

.detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  margin-top: 30px;
}

.detail-main,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  padding: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #7dd3fc;
  font-size: 14px;
  margin-bottom: 14px;
}

.detail-main h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.75);
}

.content-section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.content-section p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.95;
}

.detail-side img {
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hidden {
  display: none !important;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
  padding: 34px 0;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.75;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  align-content: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
}

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

.footer-links a:hover {
  color: #7dd3fc;
}

@media (max-width: 1060px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .hero {
    min-height: 640px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .movie-card-wide {
    flex-direction: column;
  }

  .movie-card-wide .poster-wrap {
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
  }

  .rank-row {
    grid-template-columns: 46px 88px minmax(0, 1fr);
  }

  .rank-side {
    grid-column: 3;
    text-align: left;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

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

  .movie-row-scroll .movie-card {
    width: 82vw;
    flex-basis: 82vw;
  }

  .detail-main,
  .detail-side {
    padding: 20px;
  }
}
