:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --primary: #818cf8;
  --primary-strong: #6366f1;
  --accent: #ec4899;
  --warm: #f59e0b;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  position: relative;
  z-index: 1;
}

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

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-strong), var(--accent));
  box-shadow: 0 14px 36px rgba(99, 102, 241, 0.38);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong,
.footer-brand strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: white;
}

.nav-search {
  width: 280px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

.nav-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: white;
  padding: 10px 14px;
  background: transparent;
}

.nav-search input::placeholder,
.filter-controls input::placeholder {
  color: #64748b;
}

.nav-search button {
  border: 0;
  color: white;
  cursor: pointer;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--primary-strong), var(--accent));
}

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

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

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

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-carousel {
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 44px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.8) 42%, rgba(15, 23, 42, 0.2) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(129, 140, 248, 0.22), transparent 28rem),
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: 1.08fr 0.72fr;
  gap: 36px;
  align-items: center;
  padding: 64px;
}

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

.hero-copy h1,
.hero-copy h2,
.page-banner h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-text {
  width: min(680px, 100%);
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-list span {
  color: #dbeafe;
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.16);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
}

.tag-list span {
  padding: 4px 8px;
  font-size: 12px;
}

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

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--primary-strong), var(--accent));
  box-shadow: 0 16px 42px rgba(99, 102, 241, 0.35);
}

.ghost-btn,
.section-more {
  color: var(--muted-strong);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

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

.hero-poster {
  justify-self: end;
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span,
.card-play {
  position: absolute;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.9);
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.45);
}

.hero-poster span {
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%);
  font-size: 26px;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  font-size: 34px;
  background: rgba(2, 6, 23, 0.58);
  transform: translateY(-50%);
}

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

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

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 64px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(203, 213, 225, 0.35);
}

.hero-dots button.is-active {
  background: white;
}

.home-search-panel,
.page-banner,
.filter-panel,
.content-section,
.detail-hero,
.player-section,
.detail-content {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 34px;
}

.home-search-panel,
.page-banner,
.filter-panel,
.detail-hero,
.detail-content {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.25);
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: 28px;
  align-items: center;
  padding: 34px;
}

.home-search-panel h2,
.section-head h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.home-search-panel p,
.section-head p,
.page-banner p,
.detail-content p,
.category-card p {
  color: var(--muted-strong);
}

.home-search-panel form {
  display: flex;
  gap: 12px;
}

.home-search-panel input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  color: white;
  padding: 0 16px;
  background: rgba(2, 6, 23, 0.46);
}

.content-section {
  padding: 10px 0;
}

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

.section-head.compact {
  align-items: start;
}

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

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

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

.movie-card:hover {
  border-color: rgba(129, 140, 248, 0.48);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.55);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  filter: brightness(0.82);
  transform: scale(1.05);
}

.quality-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--warm), var(--accent));
}

.card-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

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

.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--primary);
}

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

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

.category-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(236, 72, 153, 0.08)),
    rgba(15, 23, 42, 0.72);
}

.category-card.large {
  min-height: 260px;
}

.category-title {
  display: inline-flex;
  margin-bottom: 12px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

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

.mini-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.35);
}

.mini-link:hover {
  color: white;
  border-color: rgba(129, 140, 248, 0.4);
}

.mini-link em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.two-column-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

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

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

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

.rank-row:hover {
  border-color: rgba(129, 140, 248, 0.45);
}

.rank-num {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
}

.rank-main {
  display: grid;
  gap: 4px;
}

.rank-main strong {
  color: white;
}

.rank-main em,
.rank-score {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-score {
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  text-align: center;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.12);
}

.page-banner {
  margin-top: 28px;
  padding: 48px;
  background:
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.74));
}

.page-banner h1 {
  margin-bottom: 16px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.filter-panel strong {
  font-size: 22px;
}

.filter-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.detail-hero {
  margin-top: 28px;
  padding: 26px;
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  background: var(--bg-soft);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
  color: var(--muted-strong);
  font-size: 18px;
}

.meta-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.meta-table div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.32);
}

.meta-table dt {
  color: var(--muted);
  font-size: 13px;
}

.meta-table dd {
  margin: 4px 0 0;
  color: white;
  font-weight: 800;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.56));
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  background: linear-gradient(135deg, var(--primary-strong), var(--accent));
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.48);
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  padding: 34px;
}

.detail-content section + section {
  margin-top: 30px;
}

.detail-content p {
  font-size: 17px;
}

.prev-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.prev-next a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.3);
}

.prev-next a:hover {
  color: white;
  border-color: rgba(129, 140, 248, 0.4);
}

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

.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: #64748b;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

  .hero-content,
  .home-search-panel,
  .filter-panel,
  .detail-layout,
  .two-column-section {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 44px;
  }

  .hero-poster {
    justify-self: start;
    width: 220px;
  }

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

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

@media (max-width: 760px) {
  .nav-shell,
  .hero-carousel,
  .home-search-panel,
  .page-banner,
  .filter-panel,
  .content-section,
  .detail-hero,
  .player-section,
  .detail-content,
  .footer-shell,
  .copyright,
  .mobile-nav {
    width: min(100% - 20px, 1280px);
  }

  .hero-carousel {
    min-height: 760px;
    margin-top: 14px;
  }

  .hero-content {
    padding: 30px 22px 76px;
    align-content: center;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

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

  .home-search-panel,
  .page-banner,
  .filter-panel,
  .detail-hero,
  .detail-content {
    padding: 22px;
  }

  .home-search-panel form,
  .section-head,
  .footer-shell,
  .footer-links,
  .prev-next {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-grid.wide,
  .side-grid,
  .mini-list.two,
  .meta-table {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 40px 50px 1fr;
  }

  .rank-score {
    display: none;
  }

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