:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.88);
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --brand: #d97706;
  --brand-dark: #9a3412;
  --brand-soft: #f59e0b;
  --shadow: 0 22px 60px rgba(146, 64, 14, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 36rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.34);
}

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

.nav-menu a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #7c2d12;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover {
  color: #ffffff;
  background: #d97706;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: #d97706;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #431407;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(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(28px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.52;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(67, 20, 7, 0.96) 0%, rgba(67, 20, 7, 0.78) 42%, rgba(67, 20, 7, 0.35) 100%),
    linear-gradient(0deg, rgba(67, 20, 7, 0.86), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 0 160px;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 237, 213, 0.24);
}

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

.hero-actions,
.hero-controls,
.filter-bar,
.inline-search,
.wide-search {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

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

.btn-primary,
.wide-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.3);
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.btn:hover,
.wide-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(234, 88, 12, 0.38);
}

.btn.full {
  width: 100%;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 42px;
  justify-content: flex-start;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.72;
}

.hero-dot.is-active {
  width: 34px;
  background: #f59e0b;
  opacity: 1;
}

.search-hero {
  margin-top: -58px;
  position: relative;
  z-index: 6;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid rgba(251, 191, 36, 0.32);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2,
.section-head h2,
.side-panel h2,
.footer-grid h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
  color: #7c2d12;
}

.search-panel p,
.section-head p,
.page-hero p,
.footer-grid p,
.movie-card-body p,
.detail-content p,
.category-card p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.75;
}

.wide-search,
.inline-search,
.filter-bar {
  width: 100%;
}

.wide-search input,
.inline-search input,
.filter-bar input,
.filter-bar select {
  min-height: 48px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.wide-search input,
.inline-search input,
.filter-bar input {
  flex: 1;
  padding: 0 18px;
}

.filter-bar select {
  padding: 0 14px;
}

.section {
  padding: 76px 0 0;
}

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

.section-head p {
  margin: 8px 0 0;
}

.section-link {
  flex-shrink: 0;
  color: #d97706;
  font-weight: 900;
}

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

.category-card,
.category-overview-card a {
  display: block;
  min-height: 148px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid rgba(251, 191, 36, 0.34);
  box-shadow: 0 16px 38px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card a:hover,
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(146, 64, 14, 0.16);
}

.category-card span,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  color: #9a3412;
  font-size: 20px;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 18px 40px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card[hidden],
.rank-table-row[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #451a03, #f59e0b);
}

.poster-link img,
.poster-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(120, 53, 15, 0.8);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

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

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

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

.movie-card-body p {
  display: -webkit-box;
  min-height: 68px;
  margin: 0 0 12px;
  overflow: hidden;
  font-size: 13px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.65fr);
  gap: 30px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #fff7ed;
}

.rank-num,
.rank-index {
  color: #ea580c;
  font-weight: 950;
}

.rank-title {
  color: #7c2d12;
  font-weight: 900;
}

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

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

.page-main {
  padding-bottom: 80px;
}

.page-hero {
  padding: 72px 0 16px;
}

.page-hero h1 {
  color: #7c2d12;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: 18px;
}

.category-overview-card span {
  display: inline-flex;
  margin-top: 16px;
  color: #d97706;
  font-weight: 900;
}

.filter-bar {
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.filter-bar input {
  min-width: min(100%, 320px);
}

.rank-table {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: var(--shadow);
}

.rank-table-head,
.rank-table-row {
  display: grid;
  grid-template-columns: 90px 1.35fr 1fr 0.8fr 0.6fr;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
}

.rank-table-head {
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 900;
}

.rank-table-row {
  border-top: 1px solid #ffedd5;
  transition: background 0.2s ease;
}

.rank-table-row:hover {
  background: #fff7ed;
}

.rank-main {
  color: #7c2d12;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  padding-top: 36px;
}

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

.player-card,
.detail-content,
.poster-panel,
.side-panel {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  background: #111827;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 20px 48px rgba(234, 88, 12, 0.42);
  font-size: 34px;
}

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

.detail-content {
  margin-top: 22px;
  padding: 30px;
}

.detail-content h1 {
  color: #7c2d12;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-content .lead {
  margin: 18px 0 20px;
  color: #92400e;
  font-size: 20px;
  font-weight: 700;
}

.detail-content h2 {
  margin-top: 28px;
  font-size: 26px;
}

.detail-content p {
  font-size: 17px;
}

.detail-tags {
  margin: 18px 0 8px;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 20px;
}

.poster-panel {
  overflow: hidden;
  padding: 16px;
}

.poster-panel img {
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: linear-gradient(135deg, #451a03, #f59e0b);
  margin-bottom: 14px;
}

.side-panel {
  padding: 22px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin: 16px 0 0;
}

.side-panel dt {
  color: #92400e;
  font-weight: 900;
}

.side-panel dd {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 90px;
  padding: 46px 0;
  color: #ffedd5;
  background: #431407;
}

.footer-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
}

.footer-logo,
.footer-grid h2 {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.1);
}

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

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

  .detail-layout,
  .section-split,
  .search-panel {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 251, 235, 0.96);
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: var(--shadow);
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding: 92px 0 140px;
  }

  .hero-actions,
  .hero-controls,
  .wide-search,
  .filter-bar,
  .inline-search {
    align-items: stretch;
    flex-direction: column;
  }

  .search-panel {
    padding: 20px;
  }

  .section {
    padding-top: 52px;
  }

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

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

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

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

  .rank-item .rank-meta {
    grid-column: 2;
  }

  .rank-table {
    overflow-x: auto;
  }

  .rank-table-head,
  .rank-table-row {
    min-width: 760px;
  }

  .detail-content {
    padding: 22px;
  }

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

@media (max-width: 440px) {
  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .side-grid {
    grid-template-columns: 1fr;
  }

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