:root {
  --bg: #f3f6fb;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --blue: #2563eb;
  --blue-2: #60a5fa;
  --green: #16a34a;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.38);
}

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

.nav-link {
  color: #cbd5e1;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(96, 165, 250, 0.18);
}

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

.top-search input,
.mobile-search input,
.local-search,
.search-box input,
.search-box select {
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  padding: 11px 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  outline: none;
}

.search-box input,
.search-box select,
.local-search {
  width: 100%;
  background: #ffffff;
  color: var(--text);
}

.top-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.play-trigger,
.search-box button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.25s ease;
}

.top-search button,
.mobile-search button,
.search-box button,
.primary-btn {
  background: var(--blue);
  color: #ffffff;
  padding: 11px 18px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.top-search button:hover,
.mobile-search button:hover,
.search-box button:hover,
.primary-btn:hover,
.play-trigger:hover {
  transform: translateY(-1px);
  background: #1d4ed8;
}

.secondary-btn {
  color: #ffffff;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 14px 16px 20px;
}

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

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

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

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 22%, rgba(59, 130, 246, 0.36), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.86) 48%, rgba(15, 23, 42, 0.48) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 42px;
  padding: 70px 0;
}

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

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

.hero-tags,
.tag-row,
.meta-row,
.detail-meta,
.breadcrumb,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.13);
  color: #e0f2fe;
  font-size: 13px;
}

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

.hero-card {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-card img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 15px;
}

.hero-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.hero-card p {
  margin: 0;
  color: #bfdbfe;
}

.hero-arrows {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  font-size: 24px;
}

.section {
  padding: 62px 0;
}

.section.white {
  background: #ffffff;
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  transition: 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

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

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

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

.card-line {
  min-height: 54px;
  margin: 0 0 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.meta-row span + span::before {
  content: "·";
  margin-right: 9px;
  color: #94a3b8;
}

.tag-row span {
  background: #eff6ff;
  color: #2563eb;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
}

.tile-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: #0f172a;
}

.tile-covers img {
  height: 116px;
  object-fit: cover;
}

.tile-content {
  padding: 22px;
}

.tile-content h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.tile-content p {
  margin: 0 0 15px;
  color: var(--muted);
}

.tile-content span {
  display: inline-flex;
  color: var(--blue);
  font-weight: 800;
}

.page-hero {
  background:
    radial-gradient(circle at 84% 20%, rgba(59, 130, 246, 0.34), transparent 32%),
    linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 58px 0;
}

.page-hero p {
  color: #cbd5e1;
  max-width: 780px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 900;
  font-size: 20px;
}

.rank-item img {
  width: 92px;
  height: 124px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

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

.rank-score {
  min-width: 82px;
  text-align: center;
  color: var(--orange);
  font-size: 26px;
  font-weight: 900;
}

.detail-hero {
  background:
    radial-gradient(circle at 84% 18%, rgba(37, 99, 235, 0.32), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
  color: #ffffff;
  padding: 42px 0 58px;
}

.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb a,
.breadcrumb span {
  background: rgba(255, 255, 255, 0.1);
}

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

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
}

.detail-lead {
  margin: 0 0 20px;
  max-width: 860px;
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 18px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

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

.content-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.content-card p {
  margin: 0 0 18px;
  color: #334155;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.55);
  z-index: 3;
}

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

.play-trigger {
  min-width: 132px;
  padding: 14px 24px;
  background: var(--blue);
  color: #ffffff;
  font-size: 18px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.side-card img {
  width: 86px;
  height: 114px;
  border-radius: 12px;
  object-fit: cover;
}

.side-card h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px;
  margin-bottom: 24px;
}

.empty-state {
  padding: 36px;
  border-radius: 22px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

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

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

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

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

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

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

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

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

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

  .hero-card {
    max-width: 360px;
  }

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

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

  .header-inner {
    min-height: 64px;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    align-items: end;
    padding: 42px 0 96px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head,
  .toolbar {
    display: block;
  }

  .more-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

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

  .rank-item img {
    width: 72px;
    height: 98px;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
    font-size: 20px;
  }

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

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