:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --indigo: #818cf8;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 6%, rgba(34, 211, 238, 0.15), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(96, 165, 250, 0.14), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

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

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

.brand-text {
  font-size: 20px;
  background: linear-gradient(135deg, #67e8f9, #93c5fd, #c4b5fd);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 8px 12px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ecfeff;
  background: rgba(34, 211, 238, 0.13);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: rgba(2, 6, 23, 0.94);
}

.mobile-link {
  padding: 10px 12px;
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.97) 0%, rgba(2, 6, 23, 0.84) 38%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 56px;
  align-items: center;
  min-height: 720px;
  padding: 96px 0 88px;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.11);
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(38px, 7vw, 80px);
}

.hero-copy h2 + p,
.hero-copy h1 + h2,
.hero-copy h2 + h2 {
  margin-top: 18px;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  color: #cbd5e1;
  font-size: 12px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-more,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-form button {
  border: 0;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #020617;
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.24);
  cursor: pointer;
}

.ghost-btn,
.section-more {
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.16);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.small-cover img,
.rank-thumb img,
.overview-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.search-band {
  position: relative;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
}

.search-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.search-band h2,
.search-band p {
  margin: 0;
}

.search-band p {
  color: var(--muted);
}

.search-form {
  display: flex;
  align-items: center;
  width: min(520px, 100%);
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.54);
}

.search-form input,
.local-filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-form input {
  padding: 0 14px;
}

.search-form input::placeholder,
.local-filter-input::placeholder {
  color: #64748b;
}

.content-section {
  padding: 72px 0;
}

.content-section:nth-of-type(even) {
  background: rgba(15, 23, 42, 0.34);
}

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

.section-title-row h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-title-row p {
  margin: 10px 0 0;
  max-width: 680px;
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.66));
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.42);
}

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

.poster-link img {
  transition: transform 0.36s ease, filter 0.36s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.poster-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h2,
.rank-content h2,
.small-card h3,
.category-tile h2,
.category-overview-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.34;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover,
.small-card h3 a:hover,
.category-overview-card h2 a:hover {
  color: var(--cyan);
}

.meta-line,
.card-desc,
.rank-content p,
.rank-content span,
.small-card p,
.category-tile p,
.category-overview-card p,
.detail-article p {
  color: var(--muted);
}

.meta-line {
  margin: 5px 0;
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

.category-tile,
.category-overview-card,
.sidebar-panel,
.detail-article {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 20px 52px rgba(2, 6, 23, 0.2);
}

.category-tile {
  padding: 22px;
  min-height: 220px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.34);
}

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

.category-tile h2 {
  margin-top: 8px;
  font-size: 21px;
}

.tile-links,
.overview-links,
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tile-links a,
.overview-links a,
.quick-chips a {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #bae6fd;
  font-size: 12px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.9));
}

.slim-hero {
  padding: 72px 0 62px;
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 62px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.overview-covers img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.filter-panel {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.52);
}

.local-filter-input {
  min-height: 36px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(96, 165, 250, 0.95));
  color: #020617;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.rank-content h2 {
  font-size: 17px;
}

.rank-content p,
.rank-content span {
  display: block;
  margin: 3px 0 0;
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.sidebar-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.sidebar-panel h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

.small-card-row,
.small-card-stack {
  display: grid;
  gap: 14px;
}

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

.small-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.small-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
}

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

.small-card p {
  margin: 4px 0 0;
  font-size: 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

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

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  color: #67e8f9;
  font-size: 12px;
}

.detail-meta-grid span {
  margin-top: 3px;
  color: #e2e8f0;
}

.detail-tags {
  margin: 0 0 26px;
}

.player-section {
  padding: 72px 0;
  background: #020617;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72)),
    radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 20rem);
  color: #fff;
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #020617;
  font-size: 34px;
  box-shadow: 0 22px 46px rgba(34, 211, 238, 0.32);
}

.player-cover strong {
  font-size: 20px;
}

.detail-columns {
  align-items: start;
}

.detail-article {
  padding: 28px;
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 34px;
}

.detail-article p {
  margin: 0;
  font-size: 17px;
}

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

.movie-card-compact .card-desc {
  min-height: auto;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
  padding: 48px 0;
}

.footer-grid p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
}

.is-filter-hidden {
  display: none !important;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

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

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

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

  .hero-carousel,
  .hero-content {
    min-height: 690px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 92px 0 112px;
  }

  .hero-poster {
    display: none;
  }

  .search-band-inner,
  .section-title-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .category-grid,
  .category-overview-grid,
  .rank-list-preview,
  .two-column,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-meta-grid,
  .small-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-panel {
    position: static;
  }
}

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

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

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-controls {
    bottom: 24px;
  }

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

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

  .card-desc {
    display: none;
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 58px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .detail-meta-grid,
  .small-card-row {
    grid-template-columns: 1fr;
  }

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

  .content-section,
  .player-section {
    padding: 54px 0;
  }
}
