:root {
  color-scheme: dark;
  --bg: #070b16;
  --bg-soft: #0d1424;
  --panel: rgba(17, 24, 39, 0.84);
  --panel-strong: rgba(10, 15, 28, 0.94);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --orange: #f97316;
  --orange-light: #fb923c;
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(249, 115, 22, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 18%, rgba(6, 182, 212, 0.16), transparent 32rem),
    linear-gradient(180deg, #090d19 0%, var(--bg) 48%, #050711 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 70%);
}

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(8, 13, 25, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.28);
}

.brand-text,
.footer-brand span:last-child {
  font-size: 20px;
  background: linear-gradient(90deg, var(--orange-light), var(--cyan-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #d1d5db;
  font-size: 15px;
}

.nav-links a {
  padding: 9px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--orange-light);
}

.nav-toggle {
  display: none;
  color: var(--text);
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.section-wrap {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: clamp(560px, 76vh, 820px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.08) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 22, 0.98) 0%, rgba(7, 11, 22, 0.78) 42%, rgba(7, 11, 22, 0.28) 100%),
    linear-gradient(0deg, rgba(7, 11, 22, 1) 0%, transparent 34%, rgba(7, 11, 22, 0.42) 100%);
}

.hero-copy {
  position: absolute;
  left: max(16px, calc((100vw - 1220px) / 2));
  top: 50%;
  z-index: 2;
  width: min(680px, calc(100% - 32px));
  transform: translateY(-48%);
}

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

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.hero-copy h2,
.page-title h1,
.home-intro h1,
.detail-copy h1 {
  margin: 16px 0;
  line-height: 1.05;
  font-size: clamp(38px, 6vw, 76px);
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-title p,
.home-intro p,
.detail-line {
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.quick-search button,
.category-overview-head a,
.section-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.primary-btn,
.quick-search button {
  color: white;
  border: 0;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.24);
}

.ghost-btn,
.category-overview-head a,
.section-head a {
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search button:hover,
.category-overview-head a:hover,
.section-head a:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: max(16px, calc((100vw - 1220px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.22);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 32px;
  align-items: end;
  padding: 64px 0 18px;
}

.home-intro h1,
.page-title h1 {
  font-size: clamp(34px, 4.6vw, 58px);
}

.quick-search,
.filter-panel {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  outline: none;
  padding: 0 16px;
  min-height: 46px;
}

.quick-search input {
  flex: 1;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 72px 0 24px;
}

.section-head h2,
.category-overview-head h2,
.detail-text h2,
.site-footer h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 36px);
}

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

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

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

.movie-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(12, 18, 31, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.13);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(6, 182, 212, 0.2));
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.quality-badge,
.year-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.quality-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
}

.year-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

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

.category-tile,
.category-overview-card,
.more-panel,
.detail-text article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 28px;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(6, 182, 212, 0.26));
}

.category-tile span {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 900;
}

.category-tile p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.75;
}

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

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

.rank-card {
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  overflow: hidden;
}

.rank-link {
  display: grid;
  grid-template-columns: 54px 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.rank-num {
  color: transparent;
  background: linear-gradient(135deg, var(--orange-light), var(--cyan-light));
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 26px;
  font-weight: 950;
}

.rank-link img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info strong,
.rank-info em,
.rank-info small {
  display: block;
}

.rank-info strong {
  line-height: 1.35;
}

.rank-info em {
  margin: 6px 0;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.rank-info small {
  color: var(--orange-light);
  font-weight: 900;
}

.page-main {
  padding-top: 48px;
}

.page-title {
  max-width: 820px;
  margin-bottom: 34px;
}

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

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

.filter-panel {
  margin-bottom: 28px;
  border-radius: 24px;
  flex-wrap: wrap;
}

.filter-panel input {
  flex: 1 1 260px;
}

.filter-panel select {
  flex: 0 1 170px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-overview-card {
  padding: 24px;
  margin-bottom: 28px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.category-overview-head p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-main {
  padding-bottom: 60px;
}

.detail-hero {
  padding-top: 48px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(230px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.1), transparent 38%),
    linear-gradient(315deg, rgba(6, 182, 212, 0.11), transparent 40%),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  color: #dbeafe;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
}

.large-tags span {
  padding: 8px 12px;
}

.player-section {
  margin-top: 56px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.video-play-button {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  box-shadow: 0 24px 60px rgba(249, 115, 22, 0.32);
  display: grid;
  place-items: center;
  font-size: 34px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.video-play-button:hover {
  transform: scale(1.07);
}

.video-shell.is-playing .video-play-button {
  opacity: 0;
  pointer-events: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-top: 44px;
}

.detail-text article {
  padding: 28px;
}

.detail-text p {
  color: #cbd5e1;
  line-height: 2;
  font-size: 16px;
}

.more-panel {
  padding: 2px 24px 24px;
  margin-top: 44px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.pagination a.is-current {
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  color: white;
}

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

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 32px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.site-footer a:hover {
  color: var(--orange-light);
}

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .compact-grid,
  .mini-grid,
  .wide-rank {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .site-nav {
    min-height: 64px;
  }

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    background: rgba(8, 13, 25, 0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .hero {
    min-height: 660px;
  }

  .hero-copy {
    top: 54%;
  }

  .hero-actions,
  .detail-actions,
  .section-head,
  .category-overview-head,
  .home-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .home-intro,
  .detail-layout,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .filter-panel {
    border-radius: 24px;
    flex-direction: column;
  }

  .quick-search input,
  .quick-search button,
  .filter-panel input,
  .filter-panel select {
    width: 100%;
  }

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

  .detail-layout {
    padding: 18px;
  }

  .video-play-button {
    width: 74px;
    height: 74px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .mini-grid,
  .rank-grid,
  .wide-rank,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-link {
    grid-template-columns: 46px 66px 1fr;
  }

  .rank-link img {
    width: 66px;
    height: 88px;
  }
}
