:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c33;
  --panel-strong: #172554;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --cyan: #22d3ee;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 90px rgba(2, 6, 23, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 32rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.11), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 34px rgba(59, 130, 246, 0.38);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 15px;
}

.nav-links a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #60a5fa;
}

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

.nav-search input,
.wide-search input,
.catalog-filter,
.search-page-form input {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  width: 220px;
  padding: 8px 12px;
}

.nav-search button,
.wide-search button,
.mobile-nav button {
  border: 0;
  cursor: pointer;
  color: white;
  border-radius: 999px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--blue), #2563eb);
}

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

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

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

.mobile-nav form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-nav input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.6);
}

.mobile-nav nav {
  display: grid;
  gap: 12px;
  color: #cbd5e1;
}

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

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 32px 0 24px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: scale(1.02);
}

.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.48;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.62) 52%, rgba(2, 6, 23, 0.24)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 90%);
  padding: clamp(36px, 6vw, 76px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #60a5fa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.category-card-large p,
.search-panel p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta span,
.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

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

.tag-row span {
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  color: #bfdbfe;
  font-size: 12px;
  background: var(--blue-soft);
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: white;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--blue), #2563eb);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}

.ghost-btn {
  border: 1px solid var(--line);
  color: #dbeafe;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.6);
}

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

.hero-dots {
  position: absolute;
  left: clamp(36px, 6vw, 76px);
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 52px;
  background: #60a5fa;
}

.hero-side,
.ranking-panel,
.related-box,
.detail-poster-card,
.search-panel,
.catalog-toolbar,
.category-card-large {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.28);
}

.hero-side {
  padding: 22px;
}

.section-mini-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-mini-head {
  margin-bottom: 16px;
  color: white;
  font-weight: 800;
}

.section-mini-head a,
.section-head a,
.text-link {
  color: #60a5fa;
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.32);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(30, 41, 59, 0.78);
  transform: translateY(-2px);
}

.rank-row img {
  width: 54px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
  background: #0b1120;
}

.rank-row strong,
.rank-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row strong {
  color: #f8fafc;
  font-size: 14px;
}

.rank-row em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-num {
  min-width: 28px;
  color: #93c5fd;
  font-weight: 900;
  text-align: center;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 580px);
  gap: 22px;
  align-items: center;
  margin: 20px 0 58px;
  padding: 26px;
}

.search-panel h2,
.page-hero h1,
.section-head h2,
.detail-article h1 {
  margin: 0;
  color: white;
  letter-spacing: -0.03em;
}

.search-panel h2,
.section-head h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.wide-search {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.54);
}

.wide-search input {
  min-width: 0;
  flex: 1;
  padding: 12px 16px;
}

.wide-search button {
  padding: 12px 22px;
}

.content-section {
  margin: 0 0 64px;
}

.section-head {
  margin-bottom: 24px;
}

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

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

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

.movie-card:hover {
  border-color: rgba(59, 130, 246, 0.44);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.36);
}

.featured-card {
  grid-column: span 2;
  grid-row: span 2;
}

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

.featured-card .poster-link {
  aspect-ratio: 16 / 17;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 50%);
}

.movie-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.movie-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: rgba(37, 99, 235, 0.82);
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.movie-title {
  overflow: hidden;
  color: white;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title:hover {
  color: #60a5fa;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
}

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

.category-tile {
  min-height: 152px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 9rem),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  border-color: rgba(59, 130, 246, 0.46);
  transform: translateY(-4px);
}

.category-tile span,
.category-tile em {
  display: block;
}

.category-tile span {
  margin-bottom: 12px;
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.category-tile em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.7;
}

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

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

.mini-card-grid .movie-desc,
.mini-card-grid .tag-row {
  display: none;
}

.page-main {
  padding-top: 34px;
}

.page-hero {
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(34px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(23, 37, 84, 0.78)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 26rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 920px;
  font-size: clamp(34px, 5vw, 64px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 17px;
}

.category-overview {
  display: grid;
  gap: 18px;
  margin-bottom: 64px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 168px;
  overflow: hidden;
  border-radius: 18px;
  background: #0b1120;
}

.category-poster-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 0 0 10px;
  color: white;
  font-size: 28px;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
}

.catalog-toolbar label {
  display: grid;
  gap: 8px;
  min-width: min(460px, 100%);
  color: var(--muted);
  font-size: 13px;
}

.catalog-filter {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(2, 6, 23, 0.52);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: #dbeafe;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.46);
}

.filter-chips button.is-active {
  border-color: rgba(59, 130, 246, 0.72);
  background: var(--blue-soft);
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 64px;
}

.ranking-panel {
  padding: 22px;
}

.search-page-panel {
  margin-bottom: 28px;
}

.movie-detail-main {
  padding: 24px 0 64px;
}

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

.breadcrumb a {
  color: #93c5fd;
}

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

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

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  border: 0;
  color: white;
  cursor: pointer;
  text-align: center;
  background-size: cover;
  background-position: center;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-orb {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 32px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 22px 56px rgba(59, 130, 246, 0.46);
}

.player-cover strong {
  font-size: clamp(28px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.player-cover em {
  color: #bfdbfe;
  font-style: normal;
  font-weight: 800;
}

.detail-article {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

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

.detail-one-line {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-article h2 {
  margin: 34px 0 12px;
  color: white;
  font-size: 24px;
}

.detail-article p {
  color: #cbd5e1;
  line-height: 2;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.detail-poster-card {
  padding: 16px;
}

.detail-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  object-fit: cover;
  background: #0b1120;
}

.detail-poster-card .primary-btn {
  width: 100%;
  margin-top: 14px;
}

.related-box {
  padding: 18px;
}

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

.footer-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--muted);
}

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

@media (max-width: 1180px) {
  .hero-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-side,
  .detail-sidebar {
    position: static;
  }

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

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

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

  .nav-toggle {
    display: inline-flex;
  }

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

  .search-panel,
  .three-columns,
  .ranking-layout,
  .footer-shell,
  .category-card-large {
    grid-template-columns: 1fr;
  }

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

  .featured-card {
    grid-column: span 2;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .nav-shell,
  main,
  .footer-shell,
  .mobile-nav {
    width: min(100% - 20px, 1440px);
  }

  .hero-section {
    padding-top: 18px;
  }

  .hero-slider {
    min-height: 580px;
    border-radius: 22px;
  }

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

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

  .movie-grid,
  .catalog-grid,
  .feature-grid,
  .category-grid,
  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    grid-column: auto;
    grid-row: auto;
  }

  .wide-search {
    border-radius: 20px;
    flex-direction: column;
  }

  .wide-search button {
    width: 100%;
  }

  .page-hero,
  .detail-article {
    padding: 24px;
    border-radius: 22px;
  }

  .video-shell {
    border-radius: 22px;
  }

  .rank-row {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }
}
