:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c31;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-soft: #67e8f9;
  --blue: #2563eb;
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #111827 46%, #0f172a 100%);
  color: var(--text);
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 800;
}

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

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: #cbd5e1;
  font-size: 14px;
}

.nav-links a,
.mobile-panel a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
  color: var(--cyan);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.nav-search input,
.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  outline: none;
  padding: 12px 14px;
}

.nav-search input {
  width: 230px;
  padding: 10px 12px;
}

.nav-search button,
.home-search button {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(30, 41, 59, 0.92);
  padding: 10px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 24px 20px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 32%, rgba(34, 211, 238, 0.22), transparent 24rem),
    linear-gradient(0deg, #0f172a 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
  padding-top: 56px;
}

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

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #cffafe, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 760px;
  margin: 0 auto 22px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.75;
}

.hero-tags,
.detail-tags,
.tag-row,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.quick-links a {
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.52);
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.34);
}

.btn.ghost {
  border: 1px solid rgba(226, 232, 240, 0.32);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.52);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 5;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dots button {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.quick-search-card,
.content-section,
.player-section,
.detail-content-grid {
  margin-top: 42px;
}

.quick-search-card {
  margin-top: -36px;
  position: relative;
  z-index: 8;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quick-links {
  justify-content: flex-start;
  margin-top: 16px;
}

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

.section-head h2 {
  margin: 8px 0 8px;
  font-size: clamp(26px, 4vw, 42px);
}

.section-head p,
.page-hero p,
.detail-line,
.detail-article p,
.wide-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex-shrink: 0;
  color: var(--cyan);
  font-weight: 800;
}

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

.category-tile {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 12rem),
    rgba(30, 41, 59, 0.58);
  box-shadow: 0 16px 50px rgba(2, 8, 23, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.category-tile b {
  display: block;
  margin: 10px 0;
  color: var(--cyan);
  font-size: 28px;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

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

.movie-card,
.wide-card,
.detail-side,
.detail-article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.62);
  box-shadow: 0 16px 50px rgba(2, 8, 23, 0.20);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.poster-link img,
.wide-cover img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.90), transparent);
}

.play-chip,
.rank-no {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-no {
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
}

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

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

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

.meta {
  color: #93c5fd;
  font-size: 13px;
}

.line {
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  justify-content: flex-start;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

.wide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 16px;
}

.wide-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #0b1120;
}

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

.page-hero {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 6vw, 58px);
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(32px, 5vw, 58px);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-top: 24px;
}

.filter-bar select:empty {
  display: none;
}

.ranking-grid .movie-card:nth-child(-n + 3) {
  border-color: rgba(245, 158, 11, 0.56);
}

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

.detail-hero {
  min-height: 66vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 30%, rgba(34, 211, 238, 0.14), transparent 24rem);
}

.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  padding: 70px 0 48px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

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

.detail-info h1 {
  font-size: clamp(34px, 6vw, 70px);
}

.detail-tags,
.detail-actions {
  justify-content: flex-start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.28);
}

.player-start.is-hidden {
  display: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.detail-article,
.detail-side {
  padding: clamp(22px, 4vw, 34px);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 30px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

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

[data-card-list] .movie-card.is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

@media (max-width: 820px) {
  .hero {
    min-height: 76vh;
  }

  .home-search,
  .filter-bar,
  .detail-hero-grid,
  .detail-content-grid,
  .footer-grid,
  .wide-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(260px, 82vw);
    margin: 0 auto;
  }

  .detail-tags,
  .detail-actions {
    justify-content: center;
  }

  .detail-info {
    text-align: center;
  }

  .breadcrumb {
    justify-content: center;
  }

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

  .wide-card {
    grid-template-columns: 110px 1fr;
  }
}

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

  .hero-content {
    padding-top: 32px;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

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

  .wide-card {
    grid-template-columns: 92px 1fr;
    gap: 12px;
  }

  .wide-card p {
    display: none;
  }

  .quick-search-card {
    padding: 16px;
  }
}
