:root {
  --bg: #f8fafc;
  --bg-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #f59e0b;
  --brand-strong: #d97706;
  --dark: #0f172a;
  --dark-2: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.32);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link-active {
  color: #92400e;
  background: #fff7ed;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  background: #fff7ed;
  color: #92400e;
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.42), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(239, 68, 68, 0.32), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #111827 48%, #1f2937 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.7) 42%, rgba(15, 23, 42, 0.26) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 90px);
  pointer-events: none;
}

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 42px;
  align-items: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: #fde68a;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 18px;
  max-width: 760px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #fff;
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.24);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-search {
  margin-top: 28px;
  display: flex;
  max-width: 620px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  background: #fff;
  color: var(--text);
}

.hero-search button,
.search-panel button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 16px;
  padding: 0 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.hero-stage {
  position: relative;
  min-height: 430px;
}

.hero-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-card.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.hero-card-inner {
  position: relative;
  height: 430px;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.hero-card .poster {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.hero-card .poster::after,
.detail-hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.84) 100%);
}

.hero-card-content {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  z-index: 2;
}

.hero-card-content h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.hero-card-content p {
  margin: 0 0 14px;
  color: #e2e8f0;
}

.hero-dots {
  position: absolute;
  left: 26px;
  bottom: -32px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--brand);
}

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

.section {
  margin-top: 48px;
}

.section:first-child {
  margin-top: 0;
}

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

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

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

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

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-card,
.search-panel,
.player-card {
  background: var(--bg-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
  display: block;
  position: relative;
}

.poster {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.42), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.26), transparent 28%),
    linear-gradient(135deg, #1e293b, #111827);
}

.poster-card {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.poster-detail {
  aspect-ratio: 3 / 4;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: transform 0.35s ease;
}

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

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #fff;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.poster-fallback span {
  position: relative;
  z-index: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.26);
}

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #fde68a;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.meta-line,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-line span,
.tag-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

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

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

.category-card h3 {
  margin: 0 0 9px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.category-count {
  margin-top: 18px;
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff7ed;
  color: #92400e;
  font-weight: 800;
}

.page-hero {
  padding: 44px 0 18px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.breadcrumb {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.rank-card {
  padding: 16px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.rank-card h3 {
  margin: 0 0 4px;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
}

.search-panel {
  padding: 20px;
  margin: 18px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 150px;
  gap: 12px;
}

.search-panel button {
  min-height: 52px;
}

.search-results-note {
  color: var(--muted);
  margin-bottom: 18px;
}

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

.detail-hero-poster {
  position: sticky;
  top: 96px;
}

.detail-title {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-intro {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 18px;
}

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

.info-card {
  padding: 14px;
}

.info-card strong {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.info-card span {
  font-weight: 800;
}

.player-card {
  margin: 32px 0;
  overflow: hidden;
}

.player-title {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-title h2 {
  margin: 0;
  font-size: 20px;
}

.video-wrap {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.72));
  color: #fff;
  cursor: pointer;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  font-size: 30px;
  box-shadow: 0 22px 50px rgba(245, 158, 11, 0.28);
}

.play-overlay.is-hidden {
  display: none;
}

.article-block {
  margin: 28px 0;
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.article-block h2 {
  margin: 0 0 12px;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 10px 18px;
  max-width: 450px;
}

.footer-links a {
  color: #e2e8f0;
}

.empty-state {
  padding: 40px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1020px) {
  .hero-shell,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 420px;
  }

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

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

  .detail-hero-poster {
    position: relative;
    top: 0;
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding-top: 44px;
  }

  .hero-search,
  .search-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-search button {
    min-height: 48px;
  }

  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .rank-card {
    grid-template-columns: 48px 1fr;
  }

  .rank-card .btn {
    grid-column: 1 / -1;
  }
}
