:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --danger: #ef4444;
  --warning: #f97316;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.35rem;
}

* {
  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;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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.8);
  backdrop-filter: blur(16px);
}

.nav-bar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.brand-text {
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.25rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted-strong);
  font-weight: 600;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--primary);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

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

.mobile-nav a {
  display: block;
  padding: 11px 4px;
  color: var(--muted-strong);
  font-weight: 600;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 55%, #14b8a6 100%);
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.22), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.16), transparent 24%),
    rgba(2, 6, 23, 0.12);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 560px;
  grid-template-columns: 1.03fr 0.97fr;
  gap: 42px;
  align-items: center;
  padding: 86px 0;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 30px;
  color: #eff6ff;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badges span,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 8px 18px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: #ffffff;
  color: var(--primary-deep);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.hero-showcase {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 18px;
  align-items: end;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  overflow: hidden;
  padding: 18px;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
  backdrop-filter: blur(18px);
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-slide-poster {
  position: relative;
  min-height: 394px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.18);
}

.hero-slide-poster img {
  width: 100%;
  height: 100%;
  min-height: 394px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-slide:hover img {
  transform: scale(1.05);
}

.hero-slide-info {
  position: relative;
  z-index: 1;
  padding: 22px 8px 22px 0;
}

.hero-slide-info h2 {
  margin: 12px 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.hero-slide-info p {
  margin: 0 0 18px;
  color: #e0f2fe;
}

.hero-kicker {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 12px;
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 800;
}

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

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

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

.section {
  padding: 72px 0;
}

.section-soft {
  background: var(--surface);
}

.section-warm {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.section-cool {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-action {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary);
  padding: 10px 18px;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.section-action:hover {
  background: #dbeafe;
  transform: translateY(-1px);
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.movie-card-small .movie-card-body p,
.movie-grid-dense .movie-card-body p {
  display: none;
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.poster-frame img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .poster-frame img,
.compact-card:hover .compact-poster img {
  transform: scale(1.08);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-weight: 800;
}

.poster-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  font-size: 1.35rem;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
}

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 5;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 900;
}

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

.movie-card-body h3,
.compact-card h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

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

.movie-card-body p,
.compact-card p {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.movie-meta span {
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  padding: 2px 8px;
  font-weight: 700;
}

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

.category-tile {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::after {
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.22));
  content: "";
}

.category-tile:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.compact-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

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

.rank-num {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-weight: 900;
}

.filter-panel {
  margin: 0 0 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

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

.filter-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.filter-heading p {
  margin: 0;
  color: var(--muted);
}

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

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-weight: 700;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  padding: 0 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-empty {
  margin: 18px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #ffffff;
  padding: 64px 0;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #eff6ff;
  font-size: 1.08rem;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
  padding: 42px 0 72px;
}

.detail-main,
.detail-aside,
.detail-card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.detail-card {
  padding: 26px;
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #020617;
  box-shadow: var(--shadow-lg);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-deep);
  padding: 15px 26px;
  font-weight: 900;
  box-shadow: var(--shadow-lg);
}

.player-button span:first-child {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #ffffff;
}

.player-status {
  min-height: 38px;
  background: #020617;
  color: #cbd5e1;
  padding: 10px 16px;
  font-size: 0.9rem;
}

.detail-title-block h1 {
  margin: 14px 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.detail-tags span,
.tag-list a,
.tag-list span {
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted-strong);
  padding: 6px 11px;
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-tags .blue {
  background: #dbeafe;
  color: var(--primary-deep);
}

.detail-tags .green {
  background: #dcfce7;
  color: #15803d;
}

.detail-section {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.detail-section:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.detail-section p {
  margin: 0 0 12px;
  color: var(--muted-strong);
  white-space: pre-wrap;
}

.summary-box {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  padding: 22px;
}

.summary-box .one-line {
  color: var(--text);
  font-style: italic;
  font-weight: 800;
}

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

.detail-aside {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.detail-aside h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

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

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 0.85fr 1fr;
  gap: 32px;
  padding: 52px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.05rem;
}

.footer-grid p {
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #60a5fa;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.18rem;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  padding: 18px;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.back-to-top.is-visible {
  display: grid;
}

[hidden],
.is-filter-hidden {
  display: none !important;
}

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

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

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

  .detail-aside {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-layout {
    min-height: auto;
    padding: 54px 0;
  }

  .hero-showcase {
    min-height: 500px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-slide-info {
    padding: 4px 4px 18px;
  }

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

  .movie-grid,
  .movie-grid-wide,
  .movie-grid-dense,
  .search-results,
  .category-grid,
  .compact-list,
  .footer-grid,
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-heading,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

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

  .section {
    padding: 46px 0;
  }

  .hero-copy h1 {
    font-size: 2.55rem;
  }

  .hero-showcase {
    min-height: 555px;
  }

  .movie-grid,
  .movie-grid-wide,
  .movie-grid-dense,
  .search-results,
  .category-grid,
  .compact-list,
  .filter-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }
}
