:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0ea5e9;
  --brand-2: #2563eb;
  --dark: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  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(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f1f5f9 100%);
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
}

.logo-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 9px 13px;
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.main-nav a:hover {
  color: var(--brand-2);
  background: #e0f2fe;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input,
.big-search input,
.list-toolbar input,
.search-controls input,
.search-controls select {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  color: var(--text);
  font: inherit;
}

.header-search input {
  width: 210px;
  padding-left: 12px;
}

.header-search button,
.big-search button,
.search-controls button,
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.big-search button:hover,
.search-controls button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.3);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 22px;
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-slide > img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(14, 165, 233, 0.38), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 56px;
  padding-top: 52px;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.hero-tags,
.detail-tags,
.tag-line,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-line span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e0f2fe;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  max-width: 670px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.btn.slim {
  padding: 9px 16px;
  font-size: 14px;
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.6);
  transform: rotate(2deg);
}

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

.hero-nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(14px);
  font-size: 36px;
  cursor: pointer;
}

.hero-nav.prev {
  left: 24px;
}

.hero-nav.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-search-panel,
.section-block,
.search-panel {
  margin-top: 36px;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: center;
  gap: 24px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(-64px);
  margin-bottom: -42px;
}

.quick-search-panel h2,
.quick-search-panel p {
  margin: 0;
}

.quick-search-panel h2 {
  font-size: 26px;
}

.quick-search-panel p {
  color: var(--muted);
}

.big-search,
.search-controls,
.list-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px;
}

.big-search input {
  flex: 1;
  padding: 0 12px;
}

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

.section-kicker {
  margin: 0 0 6px;
  color: var(--brand-2);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

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

.section-more {
  color: var(--brand-2);
  font-weight: 900;
}

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

.category-tile,
.category-summary-card,
.content-card {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.category-tile {
  padding: 18px;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  font-size: 20px;
}

.category-tile span,
.category-tile em {
  color: var(--muted);
  font-style: normal;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(14, 165, 233, 0.35), transparent 25%),
    linear-gradient(135deg, #0f172a, #1d4ed8);
}

.poster-frame img,
.ranking-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #ffffff;
  text-align: center;
  font-weight: 900;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.image-missing + .poster-fallback,
.poster-frame.missing .poster-fallback,
.ranking-cover.missing .poster-fallback,
.detail-cover.missing .poster-fallback {
  display: flex;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent);
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.35);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta span {
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.card-meta span:last-child {
  border-right: 0;
}

.tag-line {
  margin-top: 10px;
}

.tag-line span {
  color: #0369a1;
  background: #e0f2fe;
  backdrop-filter: none;
}

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

.page-main {
  padding: 42px 0 72px;
}

.page-hero {
  padding: 42px;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.55), transparent 30%),
    linear-gradient(135deg, #020617, #0f172a 55%, #1d4ed8);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

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

.category-hero .filter-chips {
  margin-top: 22px;
}

.filter-chip {
  color: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.filter-chip.active {
  color: #0f172a;
  background: #ffffff;
}

.list-toolbar {
  justify-content: space-between;
  margin-bottom: 20px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.list-toolbar input {
  flex: 1;
  padding: 8px 12px;
}

.list-toolbar span {
  color: var(--muted);
  font-weight: 800;
  padding-right: 12px;
}

.category-summary-card {
  padding: 18px;
}

.category-summary-main span,
.category-summary-main strong {
  display: block;
}

.category-summary-main span {
  font-size: 22px;
  font-weight: 900;
}

.category-summary-main strong {
  margin-top: 8px;
  color: var(--brand-2);
}

.category-summary-main p {
  color: var(--muted);
}

.category-summary-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #334155;
}

.category-summary-card li + li {
  margin-top: 6px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px 84px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.ranking-number {
  font-size: 24px;
  font-weight: 950;
  color: var(--brand-2);
  text-align: center;
}

.ranking-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.ranking-info a {
  font-size: 18px;
  font-weight: 950;
}

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

.heat-score {
  color: #ef4444;
  font-size: 20px;
  text-align: right;
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(14, 165, 233, 0.36), transparent 28%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 56%, rgba(2, 6, 23, 0.55) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  color: #ffffff;
}

.detail-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.6);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bae6fd;
  font-weight: 800;
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  color: #e0f2fe;
  font-size: 19px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  margin-top: -72px;
  position: relative;
  z-index: 3;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.36);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.38);
  font-size: 28px;
}

.player-box.playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px;
  gap: 20px;
  margin-top: 36px;
}

.content-card {
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

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

.info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
}

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

.search-panel {
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-controls {
  border-radius: 20px;
  flex-wrap: wrap;
}

.search-controls input {
  flex: 1 1 260px;
  padding: 10px 12px;
}

.search-controls select {
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.search-count {
  margin: 18px 0;
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  padding: 44px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.4fr;
  gap: 28px;
}

.footer-logo {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

[hidden] {
  display: none !important;
}

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

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

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

  .info-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-wrap: wrap;
    padding-top: 6px;
  }

  .main-nav.open {
    display: flex;
  }

  .header-search {
    width: 100%;
    order: 4;
    margin-left: 0;
  }

  .header-search input {
    flex: 1;
    width: auto;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: center;
  }

  .hero-poster {
    display: none;
  }

  .hero-nav {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    transform: none;
    margin-top: 18px;
    margin-bottom: 0;
  }

  .big-search,
  .list-toolbar {
    border-radius: 20px;
    flex-wrap: wrap;
  }

  .big-search input,
  .list-toolbar input {
    width: 100%;
    flex-basis: 100%;
    padding: 10px 12px;
  }

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

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

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

  .page-hero {
    padding: 30px 22px;
  }

  .ranking-row {
    grid-template-columns: 38px 72px minmax(0, 1fr);
  }

  .heat-score {
    grid-column: 3;
    text-align: left;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 34px 0 110px;
  }

  .detail-cover {
    width: min(240px, 70vw);
  }

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

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

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

  .hero h1 {
    font-size: 36px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .movie-card p,
  .tag-line {
    display: none;
  }

  .player-section {
    margin-top: -48px;
  }
}
