:root {
  --bg: #f8fafc;
  --text: #142033;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --dark: #0f172a;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  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", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e3a8a 52%, #0f172a);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 12px 24px rgba(34, 211, 238, 0.22);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #dbeafe, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.site-nav a {
  padding: 10px 13px;
  border-radius: 12px;
  color: #dbeafe;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: none;
  place-items: center;
  padding: 10px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  margin: 3px 0;
  display: block;
  background: #ffffff;
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: #0f172a;
}

.hero-slide {
  display: none;
  min-height: 620px;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.18)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #bfdbfe;
  font-size: 14px;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 720px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 690px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.34);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-badges span,
.tag-row span {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #1e40af;
  background: #dbeafe;
}

.hero-badges span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

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

.page-section {
  padding: 58px 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 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 {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

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

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

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

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

.card-more {
  display: inline-flex;
  margin-top: 14px;
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
}

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

.category-card {
  min-height: 168px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e3a8a, #0891b2);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f172a, #2563eb);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #164e63, #0f172a);
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
  font-size: 14px;
}

.category-card span {
  margin-top: 24px;
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 82px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

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

.rank-cover img {
  width: 82px;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

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

.search-panel {
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow);
}

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

.search-controls input,
.search-controls select {
  min-height: 48px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.empty-state {
  display: none;
  padding: 36px;
  margin-top: 20px;
  border: 1px dashed #94a3b8;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

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

.breadcrumb {
  padding-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.56));
  z-index: 5;
}

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

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.34);
}

.detail-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 22px;
}

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

.detail-text {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.content-block {
  padding: 26px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-block p {
  margin: 0;
  color: #334155;
}

.hidden {
  display: none !important;
}

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

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

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

  .hero-poster {
    max-width: 320px;
    transform: none;
  }
}

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.97);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

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

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

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

  .section-head {
    display: block;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 20px, 1200px);
  }

  .brand-text {
    font-size: 17px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

  .rank-item {
    grid-template-columns: 42px 68px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-cover img {
    width: 68px;
    height: 92px;
  }

  .page-section {
    padding: 42px 0;
  }
}
