:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --purple: #7c3aed;
  --orange: #f97316;
  --red: #dc2626;
  --green: #10b981;
  --teal: #0d9488;
  --ink: #111827;
  --soft-ink: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

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

img,
video {
  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: 60;
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.24);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 64px;
  gap: 22px;
}

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
}

.main-nav a,
.nav-dropdown > button {
  color: #eff6ff;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.nav-dropdown > button:hover {
  color: #bfdbfe;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  display: none;
  width: 190px;
  padding: 8px;
  border-radius: 14px;
  color: var(--soft-ink);
  background: #fff;
  box-shadow: var(--shadow);
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--soft-ink);
}

.dropdown-menu a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 250px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.header-search input,
.wide-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  padding: 11px 14px;
}

.header-search input::placeholder {
  color: #dbeafe;
}

.header-search button,
.wide-search button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  padding: 11px 16px;
  white-space: nowrap;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #111827, #1f2937);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.55), transparent 32%), linear-gradient(135deg, #111827, #2563eb);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
}

.hero-label,
.page-hero span {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.primary-btn:hover,
.panel-link:hover {
  transform: translateY(-2px);
  background: var(--blue-dark);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
}

.quick-search-band {
  padding: 28px 0;
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
}

.quick-search-inner h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.quick-search-inner p {
  margin: 0;
  color: #dbeafe;
}

.wide-search {
  display: flex;
  color: var(--ink);
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.wide-search button {
  background: var(--blue);
}

.content-section,
.orange-section,
.green-section {
  padding: 58px 0;
}

.orange-section {
  color: #fff;
  background: linear-gradient(90deg, #f97316, #dc2626);
}

.green-section {
  color: #fff;
  background: linear-gradient(135deg, #10b981, #0d9488);
}

.muted {
  background: #f3f4f6;
}

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

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

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

.section-head.light p,
.section-head.light h2 {
  color: #fff;
}

.section-more {
  color: var(--blue);
  background: #eff6ff;
}

.light-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.38), transparent 38%), linear-gradient(135deg, #111827, #374151);
}

.poster-wrap img,
.detail-cover img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.year-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.75);
  font-size: 12px;
  font-weight: 800;
}

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

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

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

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

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

.movie-meta-row a,
.rank-meta a {
  color: var(--blue);
  font-weight: 700;
}

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

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #1e40af;
  background: #dbeafe;
  font-size: 12px;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
  display: none;
}

.scroll-controls {
  display: flex;
  gap: 10px;
}

.scroll-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  font-size: 24px;
  cursor: pointer;
}

.movie-card-compact .movie-card-body h2 {
  font-size: 16px;
}

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

.category-tile,
.category-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.category-tile span,
.category-panel h2 {
  margin: 0;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.category-tile strong,
.category-panel p {
  color: var(--soft-ink);
  font-weight: 500;
}

.category-tile em {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.category-panel ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.panel-link {
  width: max-content;
  color: #fff;
  background: var(--blue);
}

.page-hero,
.detail-hero {
  color: #fff;
  background: radial-gradient(circle at 15% 10%, rgba(96, 165, 250, 0.55), transparent 26%), linear-gradient(135deg, #111827, #1d4ed8 58%, #7c3aed);
}

.page-hero {
  padding: 72px 0;
}

.compact-hero {
  padding: 58px 0;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 22px;
  font-weight: 900;
}

.rank-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #111827, #334155);
}

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

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

.detail-hero {
  padding: 54px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #334155);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  color: #bfdbfe;
}

.detail-one-line {
  max-width: 720px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
  color: #dbeafe;
}

.detail-meta span,
.rank-meta span,
.rank-meta a {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.rank-meta span,
.rank-meta a {
  background: #f3f4f6;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  padding: 58px 0 26px;
  background: #111827;
}

.player-section h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 26px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

.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: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.15));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  font-size: 34px;
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.45);
}

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

.detail-content {
  max-width: 900px;
}

.detail-content article {
  padding: 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content p {
  margin: 0 0 24px;
  color: var(--soft-ink);
  font-size: 17px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar select {
  min-width: 160px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

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

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

.footer-bottom {
  padding: 18px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav,
  .header-search {
    grid-column: 1 / -1;
    display: none;
  }

  .main-nav.is-open,
  .header-search.is-open {
    display: flex;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0 4px;
  }

  .dropdown-menu {
    position: static;
    display: grid;
    width: 100%;
    margin-top: 8px;
  }

  .quick-search-inner,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .detail-cover {
    max-width: 360px;
  }
}

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

  .hero {
    height: 520px;
  }

  .hero-content {
    bottom: 42px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-dots {
    right: 20px;
    bottom: 18px;
  }

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

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

  .rank-number {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .rank-item p {
    display: none;
  }

  .wide-search {
    border-radius: 18px;
  }

  .wide-search button {
    padding-inline: 12px;
  }
}
