:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --panel-soft: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --cyan-soft: rgba(6, 182, 212, 0.18);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  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 10% 0%, rgba(14, 165, 233, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.16), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 50%, #111827 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.76rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: white;
  background: rgba(51, 65, 85, 0.75);
  transform: translateY(-1px);
}

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

.header-search input,
.hero-search input,
.local-filter input,
.search-page-form input {
  border: 1px solid rgba(148, 163, 184, 0.28);
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.86);
  border-radius: 14px;
  padding: 12px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.hero-search input:focus,
.local-filter input:focus,
.search-page-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.header-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  color: white;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.nav-toggle {
  display: none;
  border: 0;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.94);
}

.mobile-nav.is-open {
  display: grid;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 680px;
  margin: 28px 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.52);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 56%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  top: 50%;
  width: min(690px, calc(100% - 48px));
  transform: translateY(-50%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  color: #67e8f9;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.hero p,
.page-hero p,
.section-heading p,
.intro-copy p,
.detail-line {
  color: #cbd5e1;
  line-height: 1.8;
}

.hero p {
  max-width: 660px;
  font-size: 1.05rem;
}

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

.hero-tags span,
.tag-row span {
  color: #bae6fd;
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(8, 47, 73, 0.45);
}

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

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

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

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

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.6);
}

.hero-poster {
  position: absolute;
  right: clamp(22px, 5vw, 70px);
  top: 50%;
  width: min(300px, 28vw);
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  background: rgba(15, 23, 42, 0.8);
}

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

.hero-poster span {
  display: block;
  text-align: center;
  padding: 14px;
  color: #cffafe;
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: 32px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

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

.hero-search {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(24px, 6vw, 72px);
  bottom: 70px;
  z-index: 4;
  display: flex;
  max-width: 560px;
  gap: 10px;
}

.hero-search input {
  flex: 1;
}

.content-section {
  margin: 34px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 38px);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
}

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

.section-heading.compact {
  align-items: center;
}

.section-heading h2,
.content-section h2,
.detail-info h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.text-link {
  color: #67e8f9;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.86);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(6, 182, 212, 0.7);
  box-shadow: 0 24px 54px rgba(6, 182, 212, 0.12);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.card-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.42s ease, filter 0.42s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
  filter: brightness(0.8);
}

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 900;
}

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

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  min-height: 2.8em;
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.4;
}

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

.card-meta,
.card-summary {
  color: var(--muted);
  line-height: 1.6;
}

.card-meta {
  margin: 0 0 10px;
  font-size: 0.88rem;
}

.card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.7em;
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.card-body .tag-row span {
  font-size: 0.75rem;
  padding: 4px 8px;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.72), rgba(30, 41, 59, 0.68));
}

.intro-copy h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.intro-stats {
  display: grid;
  place-items: center;
  min-width: 180px;
  min-height: 140px;
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.intro-stats strong {
  font-size: 3rem;
  line-height: 1;
}

.intro-stats span {
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

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

.category-tile,
.category-card-large a {
  display: block;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.65);
}

.category-tile span,
.category-card-large h2 {
  display: block;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
}

.category-tile small,
.category-card-large p {
  color: var(--muted);
}

.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: rgba(2, 6, 23, 0.32);
}

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

.ranking-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  padding: 11px;
  background: rgba(15, 23, 42, 0.78);
}

.ranking-list a {
  display: flex;
  gap: 10px;
  color: #e2e8f0;
}

.ranking-list span {
  color: #67e8f9;
  font-weight: 900;
}

.ranking-list em {
  color: #fde68a;
  font-style: normal;
  font-weight: 900;
}

.page-hero {
  margin: 28px 0 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 82% 20%, rgba(6, 182, 212, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 260px;
}

.local-filter,
.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin-top: 22px;
}

.local-filter input,
.search-page-form input {
  width: 100%;
}

.search-page-form button {
  min-width: 110px;
}

.search-summary {
  margin-bottom: 18px;
  color: #cbd5e1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 28px 0 18px;
  color: #94a3b8;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 44px);
  background:
    radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.2), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.detail-line {
  max-width: 820px;
  font-size: 1.06rem;
}

.detail-score {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.detail-score strong {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 22px;
  color: #fef3c7;
  font-size: 1.6rem;
  background: rgba(146, 64, 14, 0.3);
  border: 1px solid rgba(253, 230, 138, 0.24);
}

.detail-score span {
  color: var(--muted);
}

.large-tags {
  margin: 22px 0 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(6, 182, 212, 0.26);
  background: black;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: white;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(8, 47, 73, 0.4), rgba(2, 6, 23, 0.78));
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.42);
}

.player-overlay strong {
  font-size: 1.1rem;
}

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

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.detail-copy article {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: rgba(2, 6, 23, 0.25);
}

.detail-copy p {
  color: #cbd5e1;
  line-height: 1.9;
}

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

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

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
}

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

.site-footer a {
  display: block;
}

.site-footer a:hover {
  color: #67e8f9;
}

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

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

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

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

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

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    top: 42%;
  }

  .hero-poster {
    display: none;
  }

  .hero-search {
    flex-direction: column;
    bottom: 86px;
  }

  .intro-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .header-inner,
  main,
  .footer-grid,
  .mobile-nav {
    width: min(100% - 22px, 1240px);
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 720px;
    border-radius: 22px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.2rem;
  }

  .content-section,
  .page-hero,
  .detail-hero {
    border-radius: 22px;
    padding: 20px;
  }

  .movie-grid,
  .full-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-summary {
    display: none;
  }

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

  .local-filter,
  .search-page-form {
    flex-direction: column;
  }
}
