:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #d97706;
  --brand-dark: #b45309;
  --brand-soft: #fffbeb;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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.92);
  box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
  font-weight: 650;
}

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

.main-nav a:hover {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 680px;
  color: #fff;
  background: #0f172a;
  overflow: hidden;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.2) 100%),
    var(--hero-cover),
    radial-gradient(circle at 72% 22%, rgba(245, 158, 11, 0.34), transparent 42%),
    linear-gradient(135deg, #111827, #78350f);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-bg::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 20%, rgba(245, 158, 11, 0.28), transparent 28%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 150px 0 160px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  max-width: 820px;
  margin: 0 0 20px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-intro p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions,
.page-tools,
.search-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.btn:hover,
.hero-search button:hover,
.search-panel button:hover {
  transform: translateY(-2px);
}

.btn.primary,
.hero-search button,
.search-panel button {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 15px 30px rgba(217, 119, 6, 0.28);
}

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

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-search,
.search-panel {
  display: flex;
  width: min(620px, 100%);
  padding: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}

.hero-search input,
.search-panel input,
.page-tools input {
  flex: 1;
  min-width: 160px;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: #fff;
  background: transparent;
  font-size: 15px;
}

.hero-search input::placeholder,
.search-panel input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.section {
  padding: 56px 0;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

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

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

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

.category-card,
.category-overview-card,
.content-card,
.info-card {
  display: block;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

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

.category-card,
.category-overview-card,
.movie-card {
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-count {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.category-overview-top {
  display: flex;
  justify-content: space-between;
  color: var(--brand);
  font-weight: 800;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.sample-links a {
  padding: 5px 10px;
  background: #f3f4f6;
  border-radius: 999px;
  color: #374151;
  font-size: 13px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.poster,
.detail-poster {
  position: relative;
  display: block;
  min-height: 320px;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.1) 50%, rgba(15, 23, 42, 0.78) 100%),
    var(--cover-image),
    linear-gradient(135deg, #111827, #92400e);
  background-size: cover;
  background-position: center;
}

.movie-card.small .poster {
  min-height: 220px;
}

.poster::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.45));
}

.poster-year,
.poster-type {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  right: 12px;
}

.poster-type {
  left: 12px;
  background: rgba(217, 119, 6, 0.88);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  color: #fff;
  background: rgba(217, 119, 6, 0.9);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  padding: 16px;
}

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

.movie-info h3 a:hover {
  color: var(--brand);
}

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
}

.rank-section {
  padding: 50px 0;
  background: linear-gradient(180deg, transparent, #fff7ed, transparent);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 1fr minmax(180px, auto) 74px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.rank-item:hover {
  border-color: #f59e0b;
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  border-radius: 999px;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-extra,
.rank-score {
  color: var(--muted);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.28), transparent 28%), linear-gradient(135deg, #0f172a, #78350f);
}

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

.page-tools input {
  min-height: 46px;
  color: #111827;
  background: #fff;
  border-radius: 999px;
}

.year-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-filters button {
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
}

.year-filters button.is-active,
.year-filters button:hover {
  background: #f59e0b;
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: var(--radius);
}

.detail-hero {
  min-height: 520px;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.66)),
    var(--detail-cover),
    linear-gradient(135deg, #111827, #92400e);
  background-size: cover;
  background-position: center;
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
  padding: 78px 0;
}

.detail-poster {
  min-height: 410px;
  border: 4px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-meta span {
  padding: 6px 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.35), rgba(0, 0, 0, 0.35));
  border: 0;
  cursor: pointer;
}

.player-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(217, 119, 6, 0.94);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(217, 119, 6, 0.32);
}

.player-card.is-playing .player-overlay {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr 340px;
  gap: 20px;
  padding: 4px 0 40px;
}

.content-card h2,
.info-card h2 {
  margin-top: 0;
}

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

.info-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 14px;
  margin: 0;
}

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

.info-card dd {
  margin: 0;
}

.info-card a {
  color: var(--brand);
  font-weight: 800;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-logo {
  color: #fff;
}

.site-footer p {
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

@media (max-width: 980px) {
  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

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

  .hero-control {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .detail-poster {
    max-width: 320px;
  }

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

  .rank-extra,
  .rank-score {
    display: none;
  }
}

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

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding: 112px 0 170px;
  }

  .hero h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 36px;
  }

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

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

  .poster {
    min-height: 360px;
  }

  .hero-search,
  .search-panel {
    border-radius: 22px;
  }
}
