:root {
  --bg: #fffaf0;
  --bg-soft: #fffbeb;
  --panel: #ffffff;
  --panel-strong: rgba(255, 255, 255, 0.92);
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.14);
  --brand: #d97706;
  --brand-strong: #b45309;
  --brand-soft: #fef3c7;
  --accent: #f97316;
  --shadow: 0 24px 70px rgba(120, 53, 15, 0.16);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 42%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #7c2d12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.site-logo {
  font-size: 24px;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.site-nav a {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  width: min(320px, 28vw);
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

.top-search input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  color: #374151;
  background: transparent;
  border: 0;
  outline: 0;
}

.top-search button,
.hero-button,
.section-link,
.search-panel button,
.play-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.24);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.top-search button {
  padding: 9px 15px;
}

.top-search button:hover,
.hero-button:hover,
.section-link:hover,
.search-panel button:hover,
.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(217, 119, 6, 0.32);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #92400e;
  border-radius: 2px;
}

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

.hero-slides {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 40%, rgba(251, 191, 36, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(69, 26, 3, 0.94) 0%, rgba(120, 53, 15, 0.84) 44%, rgba(120, 53, 15, 0.20) 100%);
}

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

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: #78350f;
  background: rgba(254, 243, 199, 0.94);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.hero h1 em,
.hero h2 em {
  color: #fcd34d;
  font-style: normal;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #ffedd5;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-button,
.section-link,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.hero-button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

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

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

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

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

.section.compact {
  padding: 40px 0;
}

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

.section-title h2,
.section-title h1,
.page-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.section-title p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.section-link {
  color: #fff;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(217, 119, 6, 0.32);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: rgba(217, 119, 6, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--brand-strong);
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

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

.movie-tags,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.movie-tags span,
.meta-pills span {
  padding: 6px 9px;
  color: #92400e;
  background: #fff7ed;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  min-height: 150px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.34), transparent 38%),
    linear-gradient(135deg, #fff, #fff7ed);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 950;
}

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

.category-tile span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 40px;
  background:
    radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.26), transparent 28%),
    linear-gradient(180deg, #fff7ed, rgba(255, 255, 255, 0));
}

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

.search-panel,
.filter-panel {
  display: flex;
  gap: 12px;
  margin: 28px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
}

.search-panel input,
.filter-panel input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  color: #374151;
  background: #fffbeb;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  outline: 0;
}

.search-panel button {
  padding: 0 24px;
}

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

.rank-panel {
  position: sticky;
  top: 100px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #fffbeb;
  border-radius: 16px;
}

.rank-row img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-number {
  color: #b45309;
  font-weight: 950;
}

.rank-title {
  color: #111827;
  font-weight: 900;
  line-height: 1.35;
}

.rank-score {
  color: #fff;
  padding: 5px 8px;
  background: #d97706;
  border-radius: 999px;
  font-weight: 900;
}

.detail-page main {
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 26%),
    linear-gradient(180deg, #fff7ed 0%, #fff 45%);
}

.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #92400e;
  font-size: 14px;
  font-weight: 800;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: center;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #111827;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #fff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.72));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  min-width: 96px;
  min-height: 96px;
  padding: 0;
  font-size: 38px;
}

.player-title {
  display: block;
  margin-top: 18px;
  font-size: 22px;
  font-weight: 950;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.detail-info {
  padding: 26px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
}

.detail-info h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-info p {
  margin: 18px 0 0;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.8;
}

.content-card {
  margin-top: 28px;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 26px;
  font-weight: 950;
}

.content-card h2:not(:first-child) {
  margin-top: 28px;
}

.content-card p {
  margin: 0;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #451a03;
  color: #ffedd5;
}

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

.footer-logo {
  color: #fff;
  font-size: 24px;
}

.site-footer p {
  max-width: 640px;
  margin: 14px 0 0;
  color: #fed7aa;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  padding: 8px 12px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.empty-state {
  padding: 36px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

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

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

  .top-search {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 20px;
  }

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

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

  .search-panel,
  .filter-panel {
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .site-logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 520px;
  }

  .hero h1,
  .hero h2 {
    font-size: 40px;
  }

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

  .detail-info,
  .content-card {
    padding: 22px;
  }

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

  .rank-row img {
    width: 46px;
    height: 64px;
  }

  .rank-score {
    display: none;
  }
}
