:root {
  --bg: #030712;
  --bg-soft: #111827;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-solid: #111827;
  --panel-light: #1f2937;
  --text: #f9fafb;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #f59e0b;
  --accent-2: #f97316;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.15), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(249, 115, 22, 0.12), transparent 28%),
    linear-gradient(180deg, #030712 0%, #111827 48%, #030712 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, 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: 50;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner,
.section,
.hero-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

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

.main-nav a {
  padding: 10px 14px;
  color: #d1d5db;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 8px 12px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  margin-bottom: 36px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms 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;
  opacity: 0.48;
}

.hero-bg img.is-missing {
  display: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 1) 0%, rgba(3, 7, 18, 0.82) 42%, rgba(3, 7, 18, 0.28) 100%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.1) 0%, rgba(3, 7, 18, 0.95) 100%);
}

.hero-bg::after {
  content: attr(data-title);
  position: absolute;
  right: 8%;
  bottom: 14%;
  max-width: 380px;
  color: rgba(255, 255, 255, 0.12);
  font-size: clamp(48px, 7vw, 110px);
  font-weight: 900;
  line-height: 0.96;
  text-align: right;
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: center;
  gap: 38px;
  padding: 58px 0 76px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 14px;
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 16px;
  max-width: 850px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  font-weight: 800;
}

.hero-panel,
.filter-box,
.detail-panel,
.category-tile,
.rank-row,
.player-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 20px;
}

.hero-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

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

.mini-rank a {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.mini-rank a:hover {
  background: rgba(245, 158, 11, 0.12);
}

.mini-rank b {
  color: var(--accent);
}

.mini-rank span {
  color: var(--muted);
  font-size: 13px;
}

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

.hero-dots button {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent);
}

.section {
  padding: 34px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.24), transparent 28%),
    linear-gradient(135deg, #1f2937, #030712);
}

.poster-wrap::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-weight: 800;
}

.poster-wrap:has(img.is-missing)::after {
  display: grid;
}

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

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

.poster-wrap img.is-missing {
  display: none;
}

.score-badge,
.play-mark {
  position: absolute;
  z-index: 2;
}

.score-badge {
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 13px;
  font-weight: 900;
}

.play-mark {
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
}

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

.movie-meta-line,
.breadcrumb,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-line a {
  color: #fde68a;
}

.movie-card h3 {
  margin: 7px 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--accent);
}

.movie-card p {
  min-height: 52px;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 8px;
  color: #e5e7eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.page-hero {
  padding: 72px 0 36px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.filter-box {
  padding: 18px;
  margin-bottom: 22px;
}

.search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
}

.search-input:focus {
  border-color: rgba(245, 158, 11, 0.65);
}

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

.category-tile {
  padding: 20px;
  min-height: 142px;
}

.category-tile:hover {
  border-color: rgba(245, 158, 11, 0.42);
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

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

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

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

.rank-row .rank-no {
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel-light);
}

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

.rank-cover img.is-missing {
  display: none;
}

.rank-row h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

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

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

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

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel-light);
  box-shadow: var(--shadow);
}

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

.detail-cover img.is-missing {
  display: none;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
}

.detail-panel p {
  color: #d1d5db;
}

.player-card {
  padding: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.34), rgba(3, 7, 18, 0.78)),
    rgba(3, 7, 18, 0.72);
  cursor: pointer;
}

.play-button span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  font-size: 28px;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.text-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.text-block h2 {
  margin: 0 0 10px;
}

.text-block p {
  margin: 0 0 12px;
}

.site-footer {
  margin-top: 44px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.76);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
}

.footer-inner p {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
}

.empty-result {
  display: none;
  padding: 22px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 1024px) {
  .grid,
  .grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero,
  .hero-inner {
    min-height: 620px;
  }

  .hero-inner {
    padding-top: 32px;
  }

  .hero-panel {
    display: none;
  }

  .grid,
  .grid.compact,
  .category-grid,
  .detail-layout {
    grid-template-columns: 1fr 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
  }

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

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

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

@media (max-width: 520px) {
  .grid,
  .grid.compact,
  .category-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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