:root {
  --bg: #fff8ec;
  --bg-soft: #fff1d6;
  --surface: #ffffff;
  --ink: #2b1609;
  --muted: #7c5a3a;
  --honey: #f59e0b;
  --flame: #ef4444;
  --amber: #fbbf24;
  --ring: rgba(245, 158, 11, 0.22);
  --shadow: 0 24px 70px rgba(137, 65, 18, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 191, 36, 0.26), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(239, 68, 68, 0.14), transparent 24rem),
    linear-gradient(180deg, #fff7e6 0%, #fffaf2 42%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #b45309 0%, #f97316 48%, #f59e0b 100%);
  box-shadow: 0 16px 32px rgba(146, 64, 14, 0.26);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

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

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 22px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #fff;
  background: #180b03;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 186, 73, 0.35), transparent 20rem),
    radial-gradient(circle at 80% 12%, rgba(248, 113, 113, 0.26), transparent 24rem),
    linear-gradient(125deg, rgba(0, 0, 0, 0.82), rgba(90, 35, 5, 0.72) 48%, rgba(12, 6, 3, 0.9));
  z-index: 1;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.18);
  transform: scale(1.08);
  opacity: 0.34;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 58px 0;
}

.hero-copy {
  max-width: 720px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff6db;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.86;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--flame), var(--honey));
  color: #fff;
  box-shadow: 0 18px 34px rgba(239, 68, 68, 0.26);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  position: relative;
  border-radius: 34px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.hero-poster .cover-frame {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-meta span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: #8b3a0c;
  background: #fff4da;
  font-size: 13px;
  font-weight: 800;
}

.hero-meta span {
  color: #fff7db;
  background: rgba(255, 255, 255, 0.14);
}

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, #fff, #fbbf24);
}

.search-panel {
  position: relative;
  z-index: 5;
  margin: -38px auto 36px;
  border-radius: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 48px;
  border: 1px solid #f5d399;
  border-radius: 16px;
  padding: 0 16px;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--honey);
  box-shadow: 0 0 0 5px var(--ring);
}

.section {
  margin: 54px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(124, 65, 19, 0.10);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 58px rgba(124, 65, 19, 0.18);
}

.cover-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.68), transparent 28%),
    linear-gradient(145deg, #451a03, #f97316 58%, #facc15);
}

.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.cover-frame.is-missing img {
  opacity: 0;
}

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

.cover-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.66));
  opacity: 0.9;
}

.play-badge,
.rating-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: linear-gradient(90deg, var(--flame), var(--honey));
}

.rating-badge {
  top: 12px;
  right: 12px;
  min-width: 44px;
  padding: 6px 10px;
  text-align: center;
  color: #78350f;
  background: #fde68a;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.card-body strong {
  font-size: 17px;
  line-height: 1.35;
}

.card-body em,
.card-body small {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.card-body small {
  display: -webkit-box;
  min-height: 45px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 28px;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #92400e, #f97316 48%, #f59e0b);
  box-shadow: 0 18px 50px rgba(180, 83, 9, 0.18);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.category-card strong {
  position: absolute;
  right: 24px;
  bottom: 20px;
  font-size: 42px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 1fr minmax(220px, 0.8fr) 90px;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(124, 65, 19, 0.08);
}

.rank-row:hover {
  transform: translateX(4px);
}

.rank-no {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--flame), var(--honey));
  font-weight: 950;
}

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

.rank-meta,
.rank-heat {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 68px 0 36px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.85;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 26px 0;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.player-card,
.detail-card,
.side-card {
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0f0703;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(251, 191, 36, 0.24), transparent 15rem),
    rgba(0, 0, 0, 0.42);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--flame), var(--honey));
  box-shadow: 0 20px 60px rgba(239, 68, 68, 0.35);
  font-size: 34px;
  cursor: pointer;
}

.player-message {
  padding: 12px 18px;
  color: var(--muted);
  background: #fff7e6;
  font-size: 14px;
}

.detail-card {
  padding: 24px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #b45309;
  font-weight: 800;
}

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

.info-item {
  border-radius: 18px;
  padding: 14px;
  background: #fff7e6;
}

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

.info-item strong {
  display: block;
  margin-top: 4px;
}

.prose h2 {
  margin: 30px 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.prose p {
  margin: 0 0 16px;
  color: #4a2a13;
  line-height: 1.95;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 950;
}

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

.side-mini-list a {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 8px;
  background: #fff7e6;
}

.side-mini-list .cover-frame {
  border-radius: 14px;
}

.side-mini-list strong {
  display: block;
  line-height: 1.35;
}

.side-mini-list small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.site-footer {
  margin-top: 80px;
  padding: 52px 0;
  color: #fff6df;
  background: linear-gradient(135deg, #431407, #7c2d12 52%, #9a3412);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.site-footer p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.85;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.78);
}

.result-empty {
  border-radius: 24px;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

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

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 14px;
    border-radius: 22px;
    background: rgba(146, 64, 14, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-poster {
    max-width: 360px;
  }

  .search-panel,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

  .rank-meta,
  .rank-heat {
    grid-column: 2;
  }

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

@media (max-width: 520px) {
  .brand {
    font-size: 19px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-inner {
    min-height: 680px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body small {
    display: none;
  }
}
