:root {
  --night-950: #020617;
  --night-925: #06101f;
  --night-900: #0f172a;
  --night-850: #111c31;
  --night-800: #1e293b;
  --night-700: #334155;
  --night-500: #64748b;
  --night-400: #94a3b8;
  --night-300: #cbd5e1;
  --night-100: #f1f5f9;
  --ocean-700: #0369a1;
  --ocean-600: #0284c7;
  --ocean-500: #0ea5e9;
  --ocean-400: #38bdf8;
  --moon-600: #d97706;
  --moon-500: #f59e0b;
  --rose-500: #f43f5e;
  --green-500: #22c55e;
  --card-border: rgba(148, 163, 184, 0.16);
  --soft-border: rgba(14, 165, 233, 0.22);
  --shadow-xl: 0 24px 70px rgba(2, 6, 23, 0.58);
  --shadow-card: 0 16px 40px rgba(2, 6, 23, 0.34);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--night-100);
  background:
    radial-gradient(circle at 15% 0%, rgba(14, 165, 233, 0.22), transparent 30rem),
    radial-gradient(circle at 88% 8%, rgba(245, 158, 11, 0.13), transparent 26rem),
    linear-gradient(180deg, var(--night-950), var(--night-900) 42%, var(--night-950));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ocean-400), var(--ocean-700));
  color: white;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.3);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: var(--night-400);
  font-size: 12px;
  font-style: normal;
}

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

.main-nav a {
  color: var(--night-300);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--ocean-400);
}

.header-search {
  width: min(320px, 30vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
}

.header-search input,
.search-panel input,
.search-panel select,
.inline-filter input,
.inline-filter select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

.header-search input::placeholder,
.search-panel input::placeholder,
.inline-filter input::placeholder {
  color: var(--night-500);
}

.header-search button,
.primary-button,
.secondary-button,
.search-panel button {
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ocean-500), var(--ocean-700));
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
}

.secondary-button {
  color: var(--night-100);
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.search-panel button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

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

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

main {
  padding-top: 100px;
}

.hero-section {
  padding-top: 22px;
  padding-bottom: 48px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--soft-border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: var(--shadow-xl);
}

.hero-track {
  display: flex;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  min-height: clamp(430px, 62vw, 640px);
  scroll-snap-align: center;
  display: grid;
  align-items: end;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 48%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 48px));
  padding: 48px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  color: #e0f2fe;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(3, 105, 161, 0.26);
}

.hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--night-300);
  font-size: clamp(15px, 2vw, 18px);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-meta span,
.meta-row span,
.meta-row strong,
.tag-row span,
.source-tabs button {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-meta span {
  padding: 7px 11px;
  color: var(--night-200);
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--card-border);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(14, 165, 233, 0.7);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

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

.hero-dots button.is-active {
  width: 30px;
  background: var(--ocean-400);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.stat-card,
.info-card,
.category-card,
.search-panel,
.content-panel {
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.stat-card {
  padding: 20px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.stat-card span {
  color: var(--night-400);
  font-size: 13px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--night-400);
}

.section-more {
  color: var(--ocean-400);
  font-weight: 800;
}

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

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

.movie-card,
.wide-card,
.movie-list-card {
  min-width: 0;
}

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

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.13);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
}

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

.movie-card:hover .poster-link img,
.wide-card:hover img,
.movie-list-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.86));
}

.poster-play,
.play-chip {
  position: absolute;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(14, 165, 233, 0.86);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  min-width: 36px;
  padding: 5px 8px;
  text-align: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--moon-500), var(--rose-500));
}

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

.movie-title,
.wide-title,
.list-title {
  display: block;
  color: white;
  font-weight: 850;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-title:hover,
.wide-title:hover,
.list-title:hover {
  color: var(--ocean-400);
}

.movie-card-body p,
.wide-copy p,
.list-copy p,
.detail-summary p {
  color: var(--night-400);
}

.movie-card-body p {
  min-height: 44px;
  margin: 8px 0 12px;
  font-size: 13px;
}

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

.meta-row span,
.meta-row strong {
  padding: 4px 8px;
  color: var(--night-300);
  font-size: 12px;
  background: rgba(30, 41, 59, 0.66);
}

.meta-row strong {
  color: #fde68a;
}

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

.tag-row span {
  padding: 5px 9px;
  color: #bae6fd;
  font-size: 12px;
  background: rgba(3, 105, 161, 0.24);
  border: 1px solid rgba(56, 189, 248, 0.16);
}

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

.wide-card {
  display: grid;
  grid-template-columns: 46% 1fr;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.wide-image {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
}

.wide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.wide-copy {
  padding: 16px;
}

.wide-title {
  margin-top: 12px;
  font-size: 18px;
}

.wide-copy p {
  margin: 10px 0 0;
  font-size: 13px;
}

.movie-list {
  display: grid;
  gap: 16px;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.56);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.movie-list-card:hover {
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(30, 41, 59, 0.62);
}

.list-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
}

.list-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.list-copy {
  padding: 20px 20px 20px 0;
}

.list-title {
  font-size: 22px;
}

.list-copy p {
  margin: 8px 0 12px;
}

.search-panel {
  padding: 18px;
  margin-bottom: 26px;
}

.search-panel form,
.inline-filter {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  align-items: center;
}

.search-panel input,
.search-panel select,
.inline-filter input,
.inline-filter select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.78);
}

.search-panel button {
  min-height: 48px;
  padding: 0 22px;
}

.page-hero {
  padding: 46px 0 24px;
}

.page-hero .content-panel {
  padding: 32px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--night-300);
}

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

.category-card {
  display: block;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.38);
}

.category-card strong {
  display: block;
  font-size: 20px;
}

.category-card span {
  color: var(--night-400);
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.player-panel {
  overflow: hidden;
  border: 1px solid var(--soft-border);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.84);
  box-shadow: var(--shadow-xl);
}

.video-wrap {
  position: relative;
  background: black;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.15));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 24px 70px rgba(14, 165, 233, 0.34);
  font-size: 30px;
}

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

.player-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.player-status {
  color: var(--night-300);
  font-size: 13px;
}

.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-tabs button {
  padding: 7px 11px;
  border: 1px solid var(--card-border);
  color: var(--night-300);
  background: rgba(30, 41, 59, 0.7);
  cursor: pointer;
}

.source-tabs button.is-active {
  color: white;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.5);
}

.detail-title {
  margin: 24px 0;
}

.detail-title h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-summary,
.side-panel {
  padding: 22px;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
}

.detail-summary h2,
.side-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-summary p {
  margin: 0 0 16px;
}

.side-panel {
  position: sticky;
  top: 96px;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.7);
}

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

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.info-list dt {
  color: var(--night-400);
}

.info-list dd {
  margin: 0;
  color: white;
  text-align: right;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 28px 0 4px;
}

.pager a,
.pager span {
  min-width: 42px;
  padding: 9px 13px;
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
}

.pager .current {
  color: white;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.48);
}

.empty-state {
  padding: 34px;
  text-align: center;
  color: var(--night-300);
  border: 1px dashed var(--card-border);
  border-radius: 22px;
}

.site-footer {
  margin-top: 80px;
  padding: 46px 0 26px;
  background: rgba(2, 6, 23, 0.55);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p,
.footer-bottom {
  color: var(--night-400);
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: white;
}

.footer-grid a {
  display: block;
  margin: 7px 0;
  color: var(--night-300);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 13px;
}

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 66px;
  }

  .main-nav,
  .header-search {
    position: fixed;
    left: 16px;
    right: 16px;
    display: none;
    width: auto;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    backdrop-filter: blur(18px);
  }

  .main-nav {
    top: 76px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
  }

  .main-nav a {
    padding: 12px;
  }

  .header-search {
    top: 286px;
    padding: 8px;
  }

  body.nav-open .main-nav,
  body.nav-open .header-search {
    display: flex;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  main {
    padding-top: 76px;
  }

  .hero-content {
    width: 100%;
    padding: 34px 22px;
  }

  .hero-control {
    display: none;
  }

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

  .search-panel form,
  .inline-filter {
    grid-template-columns: 1fr;
  }

  .wide-card,
  .movie-list-card {
    grid-template-columns: 1fr;
  }

  .list-copy {
    padding: 16px;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

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

  .brand-text em {
    display: none;
  }

  .hero-slide {
    min-height: 520px;
  }

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

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

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

  .movie-card-body p {
    display: none;
  }

  .meta-row {
    gap: 6px;
  }

  .meta-row span,
  .meta-row strong {
    font-size: 11px;
  }

  .page-hero .content-panel {
    padding: 22px;
  }

  .player-overlay span {
    width: 62px;
    height: 62px;
  }
}
