:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #f97316;
  --brand-soft: rgba(249, 115, 22, 0.18);
  --brand-deep: #dc2626;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.12), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid rgba(51, 65, 85, 0.82);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.32);
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.nav-toggle {
  display: none;
  border: 0;
  background: #1e293b;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 99px;
}

.hero {
  position: relative;
  height: min(72vh, 720px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.15) 44%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 70px 22px 46px;
  display: flex;
  align-items: center;
}

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

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

.hero-copy p {
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
}

.hero-chips,
.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-chips span,
.meta-chips span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-chips span:first-child,
.meta-chips span:first-child {
  background: var(--brand);
  border-color: transparent;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #1e293b;
  color: #fff;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #334155;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c, #ef4444);
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 54px;
  background: var(--brand);
}

.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 22px 72px;
}

.content-section {
  margin: 0 0 66px;
}

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

.section-heading h2,
.section-heading h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: var(--shadow);
}

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

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

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.poster-year,
.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  left: 10px;
  background: var(--brand);
}

.poster-type {
  right: 10px;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  top: auto;
  bottom: 10px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #fdba74;
}

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

.card-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted-strong);
  font-size: 12px;
  margin-bottom: 10px;
}

.card-meta span {
  max-width: 48%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.92);
  font-size: 12px;
}

.feature-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.quick-search {
  position: relative;
  z-index: 4;
  max-width: 760px;
  margin-top: 30px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 13px;
  color: #fff;
  background: rgba(2, 6, 23, 0.8);
  padding: 0 14px;
  font: inherit;
}

.quick-search button {
  flex: none;
  border: 0;
}

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

.category-card {
  min-height: 180px;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.6);
}

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

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  color: #fdba74;
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 28px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.52);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(249, 115, 22, 0.18), transparent 30%),
    radial-gradient(circle at 72% 0%, rgba(220, 38, 38, 0.12), transparent 28%);
  pointer-events: none;
}

.page-hero .main-wrap {
  position: relative;
  padding-top: 0;
  padding-bottom: 28px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.filter-bar select {
  cursor: pointer;
}

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

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

.breadcrumb a {
  color: #fdba74;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.58fr);
  gap: 28px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.12);
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.45);
}

.play-cover.hidden {
  display: none;
}

.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.play-cover span {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.35);
  font-size: 28px;
}

.detail-card,
.text-panel {
  padding: 24px;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.detail-card .lead {
  margin: 0 0 20px;
  color: var(--muted-strong);
  line-height: 1.8;
  font-size: 17px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list span:first-child {
  color: var(--muted);
}

.info-list span:last-child {
  color: #fff;
  text-align: right;
}

.detail-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.text-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.95;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: #020617;
}

.footer-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-wrap strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.footer-wrap p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(30, 41, 59, 0.88);
  color: var(--muted-strong);
}

.footer-links a:hover {
  color: #fff;
  background: var(--brand);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 28px;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.empty-state.show {
  display: block;
}

@media (max-width: 1180px) {
  .movie-grid,
  .rank-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 920px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.16);
  }

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

  .hero {
    min-height: 620px;
  }

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

  .quick-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .feature-panel,
  .detail-layout,
  .detail-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-wrap {
    height: 64px;
    padding: 0 14px;
  }

  .brand-text {
    font-size: 18px;
  }

  .main-wrap {
    padding: 34px 14px 54px;
  }

  .hero {
    min-height: 600px;
  }

  .hero-copy p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .movie-grid,
  .movie-grid.wide,
  .feature-panel .movie-grid,
  .rank-list,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .footer-wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 14px;
  }

  .footer-bottom {
    padding-left: 14px;
    padding-right: 14px;
  }
}
