:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --green: #16a34a;
  --amber: #d97706;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--slate-700);
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.header-search,
.mobile-search,
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search {
  margin-left: auto;
  min-width: 320px;
}

.header-search input,
.mobile-search input,
.search-box input,
.filter-box input,
.filter-box select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-box input:focus,
.filter-box input:focus,
.filter-box select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.mobile-search button,
.search-box button,
.primary-btn,
.ghost-btn,
.play-overlay-button {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-box button,
.primary-btn,
.play-overlay-button {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.header-search button:hover,
.mobile-search button:hover,
.search-box button:hover,
.primary-btn:hover,
.play-overlay-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.20);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--slate-800);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 16px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--slate-700);
  font-weight: 650;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #020617 0%, #172554 46%, #0f172a 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.45), transparent 32%), radial-gradient(circle at 75% 30%, rgba(168, 85, 247, 0.35), transparent 28%), linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: auto, auto, 60px 60px, 60px 60px;
}

.hero-inner {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 44px;
  align-items: center;
  padding: 74px 0 70px;
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker,
.section-kicker,
.page-kicker,
.category-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-kicker,
.section-kicker,
.category-kicker {
  color: var(--blue);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(90deg, #ffffff, #bfdbfe 48%, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy p {
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.hero-mini-list {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.hero-mini-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.hero-mini-list strong {
  color: #ffffff;
}

.hero-carousel {
  position: relative;
  min-height: 485px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

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

.hero-poster {
  position: relative;
  min-height: 485px;
  border-radius: 32px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.45);
}

.hero-poster img {
  width: 100%;
  height: 485px;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.92));
}

.hero-poster-content {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.hero-poster-content h2 {
  margin: 10px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-poster-content p {
  margin: 0 0 16px;
  color: #dbeafe;
}

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

.hero-tags span,
.tag-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.tag-list span,
.detail-tags span {
  background: #f1f5f9;
  color: var(--slate-700);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

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

.hero-dots button.is-active {
  width: 26px;
  background: #ffffff;
}

.section,
.page-section {
  padding: 70px 0;
}

.section-white {
  background: #ffffff;
}

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

.section-head h2,
.page-head h1 {
  margin: 8px 0 8px;
  color: var(--slate-900);
  line-height: 1.1;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
}

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

.section-head p,
.page-head p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

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

.feature-card,
.category-tile,
.filter-panel,
.detail-panel,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.feature-card {
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover,
.category-tile:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 24px;
  margin-bottom: 18px;
}

.feature-card h3,
.category-tile h3 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 22px;
}

.feature-card p,
.category-tile p {
  margin: 0;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.category-tile {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile-main {
  display: block;
  padding: 28px;
  min-height: 180px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.category-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}

.category-links a {
  padding: 13px 16px;
  background: #ffffff;
  color: var(--slate-700);
  font-weight: 650;
}

.category-links a:hover {
  color: var(--blue);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-thumb img {
  transform: scale(1.08);
  opacity: 0.88;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) scale(0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.24);
}

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

.movie-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
}

.chip-right {
  right: 10px;
  top: 10px;
  background: rgba(37, 99, 235, 0.92);
}

.chip-left {
  left: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-card-body p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.movie-meta-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f8fafc;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 800;
}

.page-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a8a 58%, #111827);
  color: #ffffff;
  padding: 74px 0 64px;
}

.page-hero .page-head h1,
.page-hero .page-head p {
  color: #ffffff;
}

.page-hero .page-head p {
  color: #cbd5e1;
}

.filter-panel,
.search-panel {
  padding: 22px;
  margin-bottom: 28px;
}

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

[data-filter-card].is-hidden,
.search-result-card.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #dbeafe;
  margin-bottom: 16px;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.62));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay-button {
  min-width: 96px;
  height: 96px;
  border-radius: 999px;
  font-size: 28px;
  padding: 0;
}

.detail-panel {
  padding: 26px;
  margin-top: 24px;
}

.detail-panel h2,
.detail-sidebar h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--slate-900);
}

.detail-panel p {
  color: var(--slate-700);
  margin: 0 0 16px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  border-color: #bfdbfe;
  transform: translateY(-2px);
}

.related-item img {
  width: 98px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.related-item strong {
  display: block;
  color: var(--slate-900);
  line-height: 1.35;
  margin-bottom: 4px;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.search-empty {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

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

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 52px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 12px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  max-width: 420px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid #1e293b;
  color: #64748b;
}

@media (max-width: 1100px) {
  .header-search {
    min-width: 240px;
  }

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

  .hero-carousel {
    min-height: 440px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 440px;
    height: 440px;
  }

  .movie-grid,
  .movie-grid-large,
  .search-results {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

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

  .hero-inner {
    padding: 52px 0 70px;
  }

  .feature-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid-large,
  .search-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero-actions,
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-mini-list a {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 360px;
    height: 360px;
  }

  .movie-grid,
  .movie-grid-large,
  .search-results,
  .category-links {
    grid-template-columns: 1fr;
  }

  .related-item {
    grid-template-columns: 88px 1fr;
  }

  .related-item img {
    width: 88px;
    height: 58px;
  }
}
