:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --yellow: #facc15;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 8, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 100% 8%, rgba(37, 99, 235, 0.18), transparent 35rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

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: 80;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(2, 8, 23, 0.4);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1280px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}

.brand-copy strong,
.footer-brand {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
}

.brand-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--soft);
  font-size: 15px;
  font-weight: 600;
}

.main-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.top-search {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.search-panel input,
.filter-input,
.search-panel select {
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 240px;
  padding-right: 88px;
}

.top-search input:focus,
.search-panel input:focus,
.filter-input:focus,
.search-panel select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.top-search button,
.primary-btn,
.secondary-btn,
.filter-button,
.search-panel button,
.play-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button {
  position: absolute;
  right: 4px;
  height: 34px;
  padding: 0 14px;
}

.top-search button:hover,
.primary-btn:hover,
.search-panel button:hover,
.play-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.18);
}

.mobile-toggle {
  margin-left: auto;
  width: 42px;
  height: 42px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  padding: 12px 24px 22px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  color: var(--soft);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.hero {
  position: relative;
  max-width: none;
  margin: 0 0 56px;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 44%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 24px 110px;
}

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

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

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

.hero p {
  max-width: 660px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.75;
  text-shadow: 0 2px 22px rgba(2, 6, 23, 0.65);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.hero-meta span,
.detail-meta span,
.tag-row span,
.card-meta span,
.movie-cover-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.18);
  color: #a5f3fc;
  font-size: 12px;
  font-weight: 700;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  padding: 7px 12px;
}

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

.primary-btn,
.secondary-btn,
.search-panel button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.secondary-btn {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(203, 213, 225, 0.24);
}

.secondary-btn:hover {
  background: rgba(30, 41, 59, 0.94);
}

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

.section-block {
  margin-bottom: 56px;
}

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

.section-title h2,
.section-title h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
  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.42);
  box-shadow: 0 30px 70px rgba(34, 211, 238, 0.08);
}

.movie-cover-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
}

.movie-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-cover-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.movie-cover-badge {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(8, 145, 178, 0.82);
  color: white;
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.tag-row span {
  padding: 5px 9px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.2);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.22), transparent 12rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.78));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.45);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
}

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

.category-card span {
  color: var(--cyan);
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

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

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

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

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

.rank-info strong {
  display: block;
  margin-bottom: 6px;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 64px 0 34px;
}

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

.page-hero p {
  max-width: 820px;
  color: var(--soft);
  line-height: 1.8;
  font-size: 17px;
}

.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.filter-button {
  min-height: 38px;
  padding: 0 16px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--soft);
}

.filter-button.is-active,
.filter-button:hover {
  color: white;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
}

.filter-input {
  min-width: 260px;
  border-radius: 14px;
}

.detail-shell {
  padding-top: 42px;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--cyan);
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  margin-bottom: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-copy p {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: #000;
  box-shadow: var(--shadow);
  margin-bottom: 34px;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72)),
    rgba(2, 6, 23, 0.18);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  min-width: 150px;
  height: 54px;
  font-size: 18px;
}

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

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-panel p {
  color: var(--soft);
  line-height: 1.9;
  margin: 0;
}

.search-panel {
  align-items: stretch;
}

.search-panel input {
  flex: 1 1 300px;
  border-radius: 16px;
}

.search-panel select {
  min-width: 150px;
  border-radius: 16px;
}

.search-empty {
  display: none;
  padding: 32px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.search-empty.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.88);
  color: var(--muted);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.footer-grid p {
  max-width: 680px;
  line-height: 1.8;
}

.footer-grid h3 {
  color: white;
  margin: 0 0 12px;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
}

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

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 34px;
  font-size: 13px;
}

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

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

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .top-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-wrap {
    min-height: 66px;
  }

  .hero {
    min-height: 560px;
  }

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

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

  .section-head,
  .footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 560px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-wrap {
    padding: 0 16px;
  }

  .brand-copy small {
    display: none;
  }

  .brand {
    min-width: auto;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .rank-link {
    grid-template-columns: 44px 64px 1fr;
  }

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

  .filter-input {
    min-width: 100%;
  }

  .content-panel {
    padding: 22px;
  }
}
