:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --accent: #a78bfa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 0%, rgba(167, 139, 250, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

input,
select,
button {
  font: inherit;
}

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

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #031015;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

.logo-text {
  font-size: 20px;
  background: linear-gradient(135deg, #ffffff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

.nav-link:hover,
.nav-link-active,
.mobile-panel a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 10px;
}

.nav-search button,
.big-search button,
.filter-row button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  color: #031015;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.big-search button:hover,
.filter-row button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.34);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: none;
}

.ghost-btn.small {
  padding: 8px 14px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.84);
  padding: 8px 11px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

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

.hero {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 370px;
  align-items: center;
  gap: 42px;
  opacity: 0;
  pointer-events: none;
  padding: 70px;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: scale(1.01);
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.22) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.1);
  transform: scale(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 26%, rgba(34, 211, 238, 0.22), transparent 22rem);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

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

.hero-copy h1,
.page-hero h1 {
  max-width: 760px;
  margin: 16px 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.section-heading p,
.movie-card p,
.category-tile p,
.category-overview-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy p {
  max-width: 660px;
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-line,
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.detail-tags span,
.tag-line span,
.stat-row span {
  color: #dbeafe;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  padding: 7px 12px;
  font-size: 13px;
}

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

.hero-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(167, 139, 250, 0.18));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

.hero-poster img,
.side-poster img,
.poster img,
.category-cover img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.is-missing {
  display: none;
}

.hero-backdrop {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  left: 70px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.hero-dot.is-active {
  background: var(--cyan);
}

.quick-search-panel,
.content-section,
.page-shell,
.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
}

.quick-search-panel,
.filter-panel,
.detail-card,
.side-info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.quick-search-panel {
  padding: 24px;
}

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

.big-search input,
.filter-row input,
.filter-row select {
  width: 100%;
  color: var(--text);
  outline: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.66);
  padding: 14px 16px;
}

.stat-row {
  margin-top: 18px;
}

.stat-row strong {
  color: var(--cyan);
  font-size: 20px;
}

.content-section {
  padding-top: 28px;
}

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

.section-heading h2,
.detail-card h1,
.prose-card h2,
.side-info-card h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.05em;
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.poster,
.category-cover,
.category-tile {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.32), transparent 9rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 1));
}

.poster {
  aspect-ratio: 2 / 3;
}

.poster::after,
.category-cover::after,
.category-tile::after,
.side-poster::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.04em;
}

.poster img,
.category-cover img,
.category-tile img,
.side-poster img {
  position: relative;
  z-index: 1;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  color: #031015;
  border-radius: 999px;
  background: var(--cyan);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  top: 12px;
  bottom: auto;
  background: linear-gradient(135deg, #facc15, #fb7185);
}

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

.movie-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-line span {
  padding: 4px 8px;
  font-size: 11px;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile {
  min-height: 190px;
  padding: 20px;
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.2;
}

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  margin: 10px 0 20px;
  color: var(--cyan);
  font-size: 34px;
}

.page-hero {
  margin-top: 28px;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 24rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  padding: 16px;
  align-items: center;
}

.category-cover {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
}

.filter-panel {
  margin-top: 24px;
  padding: 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px;
  margin-bottom: 18px;
}

.advanced-filter {
  grid-template-columns: 1fr 160px 180px auto;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
}

.rank-grid .movie-card:nth-child(-n + 3) {
  border-color: rgba(250, 204, 21, 0.42);
}

.detail-shell {
  margin-top: 28px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.player-column {
  min-width: 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.center-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #031015;
  background: linear-gradient(135deg, var(--cyan), #ffffff);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.28);
}

.center-play.is-hidden {
  display: none;
}

.center-play span {
  display: inline-block;
  margin-left: 4px;
  font-size: 28px;
}

.detail-card {
  margin-top: 20px;
  padding: 24px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.one-line {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.7;
}

.prose-card p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.side-column {
  position: sticky;
  top: 96px;
  align-self: start;
}

.side-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 25% 15%, rgba(34, 211, 238, 0.28), transparent 10rem),
    #0f172a;
  box-shadow: var(--shadow);
}

.side-info-card {
  margin-top: 18px;
  padding: 22px;
}

.side-info-card h2 {
  font-size: 24px;
}

.side-info-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.side-info-card div {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  padding-bottom: 12px;
}

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

.side-info-card dd {
  margin: 0;
}

.related-section {
  width: 100%;
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 30px;
  padding: 34px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--cyan);
}

.site-footer a:not(.footer-logo) {
  display: block;
  color: #cbd5e1;
  margin-top: 8px;
}

[hidden] {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr 280px;
    padding: 48px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    width: min(260px, 70vw);
    justify-self: start;
  }

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

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

  .side-column {
    position: static;
  }

  .side-poster {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .hero,
  .quick-search-panel,
  .content-section,
  .page-shell,
  .detail-shell,
  .footer-grid,
  .nav-shell,
  .mobile-panel {
    width: min(100% - 24px, 1280px);
  }

  .hero-slider {
    min-height: 650px;
  }

  .hero-slide,
  .page-hero {
    padding: 28px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 42px;
  }

  .hero-dots {
    left: 28px;
    bottom: 22px;
  }

  .big-search,
  .filter-row,
  .advanced-filter,
  .detail-title-row,
  .section-heading {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

  .logo-text {
    font-size: 17px;
  }
}
