:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f7ff;
  --text: #101828;
  --muted: #667085;
  --line: #e4eaf3;
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --primary-dark: #1d4ed8;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.10);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: #111827;
  white-space: nowrap;
}

.brand span {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.brand-icon path:first-child {
  fill: url(#brandGradient);
}

.brand-icon path:first-child,
.brand-icon path:nth-child(2) {
  fill: var(--primary);
}

.brand-icon path:nth-child(2) {
  fill: #ffffff;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #344054;
  font-weight: 600;
}

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

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--primary);
  cursor: pointer;
}

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

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

.mobile-nav-inner {
  display: grid;
  gap: 10px;
  padding: 14px 0 20px;
}

.mobile-nav a {
  padding: 10px 4px;
  color: #344054;
  font-weight: 600;
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 34%), linear-gradient(135deg, #0f172a, #172554 48%, #0e7490);
  color: #ffffff;
}

.hero .container {
  position: relative;
  min-height: 590px;
  display: grid;
  align-items: center;
  padding: 78px 0;
}

.hero-slide {
  display: none;
  grid-template-columns: 1.02fr 0.82fr;
  gap: 42px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dbeafe;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
}

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

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

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

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

.btn-light {
  background: #ffffff;
  color: var(--primary-dark);
}

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

.hero-art {
  position: relative;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.36);
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.88));
}

.hero-card {
  position: absolute;
  left: -22px;
  bottom: 28px;
  width: min(320px, calc(100% - 24px));
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  box-shadow: var(--shadow);
}

.hero-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.hero-card span {
  color: var(--muted);
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 44px;
  background: #ffffff;
}

main {
  min-height: 60vh;
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: #ffffff;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
}

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

.section-more {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.90);
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-meta a {
  color: var(--primary);
}

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

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

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 210px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #eef7ff);
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-count {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  font-weight: 900;
}

.rank-item h3 {
  margin: 0 0 2px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(130px, 0.5fr));
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text);
  outline: none;
}

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

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

.breadcrumb a {
  color: var(--primary);
  font-weight: 700;
}

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

.detail-panel {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.detail-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 22px;
}

.detail-meta span,
.detail-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  z-index: 2;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.play-button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  cursor: pointer;
}

.article-body h2 {
  margin: 28px 0 10px;
  font-size: 26px;
}

.article-body p {
  margin: 0 0 16px;
  color: #344054;
}

.side-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.side-card + .side-card {
  margin-top: 18px;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.related-list img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-soft);
}

.related-list strong {
  display: block;
  line-height: 1.35;
}

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

.site-footer {
  margin-top: 40px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 28px;
  padding: 48px 0;
}

.footer-brand span {
  color: #ffffff;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

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

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
}

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

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero .container {
    min-height: auto;
  }

  .hero-art {
    max-width: 420px;
  }

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

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

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-bar {
    height: 62px;
  }

  .brand {
    font-size: 19px;
  }

  .hero .container {
    padding: 44px 0 70px;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

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

  .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    margin-top: 16px;
  }
}
