:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.82);
  --panel-line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --primary: #2dd4bf;
  --primary-dark: #0f766e;
  --accent: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  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", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.15), transparent 28rem),
    var(--bg);
}

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.brand {
  font-size: 21px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #042f2e;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 40px rgba(45, 212, 191, 0.24);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(45, 212, 191, 0.12);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 8px 16px 16px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  color: var(--soft);
}

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

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slides {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 90px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  max-width: 900px;
  font-size: clamp(42px, 7vw, 88px);
}

.hero-content h2 {
  margin: 18px 0 10px;
  font-size: clamp(28px, 4vw, 52px);
}

.hero-content p:not(.eyebrow) {
  max-width: 720px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.detail-info .primary-button {
  margin-top: 28px;
}

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

.primary-button {
  padding: 12px 22px;
  color: #042f2e;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 42px rgba(45, 212, 191, 0.24);
}

.ghost-button,
.section-more {
  padding: 11px 18px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.58);
}

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--primary);
}

.search-panel {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.search-box label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(45, 212, 191, 0.7);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.quick-links,
.year-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a,
.filter-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.filter-button.active,
.quick-links a:hover,
.filter-button:hover {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.12);
}

.content-section {
  padding: 58px 0 12px;
}

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

.section-heading h2,
.player-section h2,
.detail-section h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p,
.detail-section p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.42);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  color: #042f2e;
  background: rgba(45, 212, 191, 0.88);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--primary);
}

.movie-meta,
.movie-line {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row,
.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tag-row span,
.genre-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 12px;
  background: rgba(148, 163, 184, 0.12);
}

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

.category-tile,
.category-card-large {
  display: block;
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--panel-line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(56, 189, 248, 0.06)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.4);
}

.category-tile strong,
.category-main-link {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

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

.category-samples {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.category-samples a {
  color: var(--soft);
}

.category-samples a:hover {
  color: var(--primary);
}

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: stretch;
}

.movie-card-compact .poster-link {
  aspect-ratio: auto;
  min-height: 158px;
}

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

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

.page-hero,
.detail-hero {
  padding: 64px 0 22px;
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(36px, 6vw, 66px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.76);
}

.player-section,
.detail-section {
  padding: 32px 0;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: cover;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.3), rgba(15, 118, 110, 0.28));
  cursor: pointer;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #042f2e;
  font-size: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 20px 60px rgba(45, 212, 191, 0.34);
}

.player-start strong {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(10px);
}

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

.detail-section {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-section p {
  max-width: 980px;
  color: var(--soft);
  font-size: 17px;
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: var(--muted);
}

.footer-grid a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding: 18px 0 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--muted);
  text-align: center;
}

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

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

  .ranking-list-wide,
  .related-list {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-carousel,
  .hero-slides {
    min-height: 590px;
  }

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

  .search-panel {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .brand {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-slides {
    min-height: 560px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content h2 {
    font-size: 28px;
  }

  .hero-content p:not(.eyebrow) {
    font-size: 16px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

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

  .movie-card-compact {
    grid-template-columns: 100px 1fr;
  }

  .movie-card-compact .poster-link {
    min-height: 146px;
  }

  .player-start span {
    width: 66px;
    height: 66px;
  }
}
