:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.74);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --rose: #fb7185;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --header-height: 76px;
}

* {
  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 15% 0%, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(167, 139, 250, 0.16), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #07111f 42%, #020617 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 72%);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.header-inner {
  width: min(1440px, calc(100% - 40px));
  height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue) 48%, var(--violet));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

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

.desktop-nav a,
.mobile-links a,
.mobile-categories a,
.footer-links a {
  color: var(--muted-strong);
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.desktop-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text);
  background: rgba(34, 211, 238, 0.12);
}

.header-search,
.mobile-search,
.search-panel,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  min-width: 310px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 12px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.header-search button,
.mobile-search button,
.search-panel button,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.20);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.26);
}

.btn.ghost {
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.20);
  box-shadow: none;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

.mobile-panel {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0 20px 22px;
}

.mobile-links,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-links a,
.mobile-categories a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

main {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: clamp(560px, calc(100vh - var(--header-height)), 820px);
  display: grid;
  align-items: center;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 34px;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

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

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 24% 22%, rgba(34, 211, 238, 0.20), transparent 34rem),
    radial-gradient(circle at 74% 76%, rgba(167, 139, 250, 0.22), transparent 32rem);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 5.5vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.85;
}

.hero-actions,
.section-head,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-actions {
  margin-top: 28px;
}

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

.hero-meta span,
.tag-row span,
.detail-tags span,
.movie-pill,
.breadcrumb a,
.breadcrumb span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.64);
  padding: 7px 11px;
  font-size: 13px;
}

.hero-poster {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  transform: rotate(1.2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(167, 139, 250, 0.12));
}

.hero-controls {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.20);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(148, 163, 184, 0.42);
}

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

.section {
  margin: clamp(44px, 7vw, 92px) 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.85;
  margin-top: 8px;
}

.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card,
.compact-card,
.category-card,
.info-panel,
.player-card,
.detail-copy,
.related-panel,
.page-hero,
.search-panel,
.filter-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(167, 139, 250, 0.12));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.84), transparent 55%);
  opacity: 0.86;
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 8px 11px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  padding: 15px 15px 17px;
}

.movie-meta-line {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card h3,
.compact-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.compact-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p,
.compact-card p,
.category-card p,
.page-hero p,
.detail-copy p,
.info-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.movie-card p {
  min-height: 74px;
  margin: 9px 0 12px;
  font-size: 14px;
}

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

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

.category-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card h2 {
  margin: 8px 0 8px;
  font-size: 24px;
}

.category-card span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.category-preview {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.8fr;
  gap: 8px;
  min-height: 150px;
}

.category-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(167, 139, 250, 0.12));
}

.category-preview img:nth-child(2) {
  transform: translateY(14px);
}

.category-preview img:nth-child(3) {
  transform: translateY(28px);
}

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

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.compact-cover {
  overflow: hidden;
  border-radius: 16px;
}

.compact-cover img {
  width: 82px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(167, 139, 250, 0.12));
}

.rank-number {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #06121f;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}

.page-hero {
  margin: 24px 0 28px;
  padding: clamp(30px, 6vw, 68px);
  overflow: hidden;
  position: relative;
}

.page-hero::after {
  position: absolute;
  right: -120px;
  top: -160px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  content: "";
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 68%);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin-top: 0;
  font-size: clamp(34px, 5vw, 64px);
}

.page-hero p {
  position: relative;
  z-index: 1;
  max-width: 840px;
  font-size: 18px;
}

.filter-panel,
.search-panel {
  padding: 16px;
  margin-bottom: 24px;
}

.filter-panel select {
  max-width: 220px;
  appearance: none;
}

.empty-state {
  display: none;
  margin: 26px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 18px;
}

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

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.30), rgba(2, 6, 23, 0.84));
  border: 0;
  text-align: center;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 34px;
  box-shadow: 0 20px 52px rgba(34, 211, 238, 0.35);
}

.player-overlay strong {
  display: block;
  font-size: 20px;
}

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

.detail-info {
  display: grid;
  gap: 16px;
}

.detail-poster {
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(167, 139, 250, 0.12));
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
}

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

.detail-copy,
.related-panel,
.info-panel {
  padding: clamp(22px, 4vw, 34px);
}

.detail-copy {
  margin-top: 24px;
}

.detail-copy h2,
.related-panel h2,
.info-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-copy p + h2 {
  margin-top: 28px;
}

.related-panel {
  margin: 24px 0 74px;
}

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

.related-grid .movie-card p {
  display: none;
}

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

.related-grid .movie-card h3 {
  font-size: 15px;
}

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

.footer-inner {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 30px;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 1.6fr;
  gap: 26px;
}

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

.footer-logo {
  font-size: 22px;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.footer-bottom {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1220px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: 720px;
  }

  .hero-poster {
    display: none;
  }

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

  .category-grid,
  .compact-list,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  :root {
    --header-height: 66px;
  }

  .header-inner,
  main,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 28px, 1440px);
  }

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

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hero-carousel {
    min-height: 640px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 26px;
  }

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1 {
    letter-spacing: -0.035em;
  }

  .hero-controls {
    left: 22px;
    right: auto;
  }

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

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

  .movie-card p {
    display: none;
  }

  .filter-panel,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-panel select {
    max-width: none;
  }

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

  .compact-cover img {
    width: 74px;
  }
}
