:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-strong: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --sky: #38bdf8;
  --blue: #2563eb;
  --rose: #f43f5e;
  --shadow: 0 20px 60px rgba(2, 6, 23, 0.55);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  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.86);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #e0f2fe;
  background: radial-gradient(circle at 30% 25%, #7dd3fc, #2563eb 55%, #0f172a 100%);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.35);
}

.brand-text {
  white-space: nowrap;
  font-size: 1.18rem;
  background: linear-gradient(90deg, #f8fafc, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  position: relative;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--sky);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.inline-filter input {
  width: min(260px, 40vw);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  outline: none;
}

.top-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.top-search button,
.mobile-search button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.top-search button,
.mobile-search button,
.primary-button {
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.32);
}

.ghost-button {
  border: 1px solid rgba(226, 232, 240, 0.26);
  background: rgba(15, 23, 42, 0.58);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  padding: 9px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.9);
}

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

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.06);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 45%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 96px 24px 156px;
  display: flex;
  align-items: center;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--sky);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 620px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.26rem);
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
}

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

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

.hero-controls button {
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  font-size: 1.7rem;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
}

.hero-dot.active {
  width: 30px;
  background: var(--sky);
}

.hero-rail {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 32px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, 1fr));
  gap: 12px;
  max-width: 520px;
}

.hero-thumb {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  opacity: 0.72;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.hero-thumb.active,
.hero-thumb:hover {
  opacity: 1;
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.75);
}

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

.hero-thumb span {
  display: block;
  padding: 8px;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-block,
.page-hero,
.detail-panel,
.breadcrumb {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.section-block {
  padding: 56px 0;
}

.intro-strip {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-heading h2,
.spotlight-panel h2,
.page-hero h1,
.detail-copy h1,
.detail-text h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.intro-strip h2,
.section-heading h2,
.spotlight-panel h2,
.detail-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.intro-strip p,
.page-hero p,
.spotlight-panel p,
.detail-text p {
  color: var(--muted);
  line-height: 1.85;
}

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

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

.section-heading a {
  color: var(--sky);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.category-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.42));
}

.category-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
}

.category-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.category-copy small {
  color: #cbd5e1;
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.32);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 26px 60px rgba(14, 165, 233, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 10px;
}

.rank-badge {
  right: 10px;
  background: linear-gradient(135deg, var(--rose), var(--blue));
}

.card-content {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 2.8em;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-content p {
  display: -webkit-box;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: #7dd3fc;
  font-size: 0.78rem;
  line-height: 1.6;
}

.tag-row {
  margin-top: 10px;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  gap: 28px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.list-rank {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sky), var(--blue));
}

.rank-poster img {
  width: 82px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy a {
  display: inline-block;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.45;
}

.rank-copy p {
  display: -webkit-box;
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-copy div {
  color: #7dd3fc;
  font-size: 0.82rem;
}

.spotlight-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mini-grid .card-content p,
.mini-grid .tag-row {
  display: none;
}

.page-main {
  padding-bottom: 28px;
}

.page-hero {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 52px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.76));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.page-hero p {
  max-width: 760px;
  margin-bottom: 0;
}

.inline-filter {
  margin-top: 24px;
}

.inline-filter input {
  width: min(720px, 100%);
  border-radius: 16px;
  padding: 15px 18px;
}

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

.rank-page-layout {
  padding-top: 32px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #7dd3fc;
}

.player-section {
  width: min(1280px, calc(100% - 48px));
  margin: 24px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.34), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 4px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 0 42px rgba(56, 189, 248, 0.45);
}

.detail-panel {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

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

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

.detail-meta {
  margin: 16px 0;
}

.one-line {
  color: #e2e8f0;
  font-size: 1.08rem;
  line-height: 1.8;
}

.detail-tags span {
  font-size: 0.82rem;
}

.detail-text {
  max-width: 980px;
  margin-top: 18px;
}

.detail-text h2 {
  margin-top: 24px;
}

.detail-text p {
  font-size: 1.03rem;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 28px;
}

.footer-inner p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
  justify-content: flex-end;
}

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

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

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

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

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

  .hero-rail {
    display: none;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

  .header-inner {
    min-height: 64px;
  }

  .hero-content {
    padding-top: 76px;
    padding-bottom: 110px;
  }

  .intro-strip,
  .section-heading,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .split-layout,
  .large-rank,
  .detail-panel {
    grid-template-columns: 1fr;
  }

  .spotlight-panel {
    position: static;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .mobile-nav,
  .section-block,
  .page-hero,
  .detail-panel,
  .breadcrumb,
  .player-section,
  .footer-inner {
    width: auto;
    margin-left: 16px;
    margin-right: 16px;
  }

  .header-inner {
    padding: 0;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-content {
    min-height: 74vh;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 14vw, 4rem);
  }

  .hero-controls {
    bottom: 20px;
  }

  .page-hero {
    padding: 32px 22px;
  }

  .category-grid,
  .all-categories,
  .movie-grid,
  .wide-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-card {
    min-height: 210px;
  }

  .rank-item {
    grid-template-columns: auto 68px minmax(0, 1fr);
  }

  .rank-poster img {
    width: 68px;
  }

  .card-content {
    padding: 12px;
  }

  .card-title {
    font-size: 0.92rem;
  }

  .card-content p,
  .tag-row {
    display: none;
  }
}
