:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --text: #24140b;
  --muted: #7c5b42;
  --line: rgba(146, 64, 14, 0.16);
  --brand: #f97316;
  --brand-dark: #c2410c;
  --gold: #f59e0b;
  --shadow: 0 22px 60px rgba(154, 52, 18, 0.18);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.28), transparent 34rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(180deg, #fff7ed 0%, #fffbeb 52%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.95), rgba(255, 237, 213, 0.95));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(154, 52, 18, 0.08);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 15px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), var(--gold));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #6b3f22;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.search-form,
.large-search {
  display: flex;
  align-items: center;
  padding: 6px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.search-form input,
.large-search input {
  width: 210px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: var(--text);
}

.search-form button,
.large-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form button,
.large-search button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 15px 30px rgba(249, 115, 22, 0.28);
}

.search-form button {
  padding: 8px 14px;
}

.large-search {
  width: min(620px, 100%);
  margin-top: 24px;
}

.large-search input {
  flex: 1;
  width: auto;
  padding: 12px 16px;
}

.large-search button {
  padding: 12px 22px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
}

.primary-btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.ghost-btn {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(249, 115, 22, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover,
.large-search button:hover {
  transform: translateY(-2px);
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--brand-dark);
}

.hero {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 28px auto 48px;
  overflow: hidden;
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: #2b1408;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 28px;
  align-items: center;
  padding: clamp(32px, 6vw, 76px);
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
  background-image:
    linear-gradient(90deg, rgba(43, 20, 8, 0.92), rgba(43, 20, 8, 0.62), rgba(43, 20, 8, 0.2)),
    var(--cover),
    linear-gradient(135deg, #431407, #fed7aa);
  background-size: cover;
  background-position: center;
}

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

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #fed7aa;
}

.hero h1,
.hero h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(36px, 5.5vw, 74px);
}

.hero h2 {
  margin-top: 10px;
  font-size: clamp(28px, 4.6vw, 58px);
}

.hero-summary {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 21px);
}

.hero-tags,
.detail-meta,
.card-actions,
.footer-links,
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #7c2d12;
  background: rgba(255, 247, 237, 0.88);
}

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

.hero-poster,
.detail-poster,
.card-poster,
.category-tile,
.category-overview-card,
.featured-line,
.rank-cover {
  background-image:
    linear-gradient(180deg, rgba(67, 20, 7, 0.08), rgba(67, 20, 7, 0.44)),
    var(--cover),
    linear-gradient(135deg, #fed7aa, #fb923c 44%, #7c2d12);
  background-size: cover;
  background-position: center;
}

.hero-poster {
  min-height: 460px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 6vw, 76px);
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #fff;
}

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 58px;
}

.soft-panel {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 18px 48px rgba(154, 52, 18, 0.08);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.section-heading > a {
  color: var(--brand-dark);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 44px rgba(154, 52, 18, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(154, 52, 18, 0.16);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.play-mark {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 12px 26px rgba(124, 45, 18, 0.32);
}

.card-body {
  padding: 18px;
}

.card-body h2,
.card-body h3,
.ranking-card h2,
.category-overview-card h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.28;
}

.card-body p,
.ranking-card p,
.category-overview-card p,
.page-hero p,
.detail-lead,
.detail-content p,
.site-footer p {
  color: var(--muted);
}

.card-body p {
  min-height: 54px;
  margin: 10px 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #9a5b28;
  font-size: 13px;
  font-weight: 700;
}

.card-actions {
  margin-top: 14px;
}

.card-actions a,
.mini-links a {
  padding: 7px 10px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(255, 237, 213, 0.8);
}

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

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(154, 52, 18, 0.13);
}

.category-tile span {
  font-size: 24px;
  font-weight: 950;
}

.category-tile small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(154, 52, 18, 0.1);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 237, 213, 0.58);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  font-weight: 950;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--gold));
}

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

.rank-meta {
  grid-column: 2;
  margin-top: -8px;
  color: var(--muted);
  font-size: 12px;
}

.page-hero,
.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 48px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 237, 213, 0.62));
  box-shadow: var(--shadow);
}

.small-hero {
  text-align: center;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 780px;
  margin: 14px auto 0;
  font-size: 18px;
}

.category-hero {
  overflow: hidden;
}

.featured-line {
  display: grid;
  gap: 6px;
  max-width: 720px;
  margin-top: 24px;
  padding: 24px;
  color: #fff;
  border-radius: 26px;
}

.featured-line span,
.featured-line em {
  color: rgba(255, 255, 255, 0.78);
}

.featured-line strong {
  font-size: 28px;
  line-height: 1.2;
}

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

.category-overview-card {
  min-height: 320px;
  display: flex;
  align-items: end;
  padding: 26px;
  color: #fff;
  border-radius: 32px;
  overflow: hidden;
}

.category-overview-card p {
  color: rgba(255, 255, 255, 0.84);
}

.category-overview-card .mini-links a {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.category-overview-card .primary-btn {
  margin-top: 18px;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(154, 52, 18, 0.08);
}

.rank-cover {
  position: relative;
  min-height: 124px;
  border-radius: 20px;
  overflow: hidden;
}

.rank-cover span {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  color: #fff;
  font-weight: 950;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.94);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #9a3412;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 48px);
  align-items: center;
}

.detail-poster {
  min-height: 560px;
  border-radius: 34px;
  box-shadow: 0 24px 70px rgba(154, 52, 18, 0.2);
}

.detail-lead {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: 20px;
}

.detail-meta {
  margin: 16px 0;
}

.player-wrap {
  margin-top: -20px;
}

.video-panel {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #170b05;
  box-shadow: 0 30px 80px rgba(67, 20, 7, 0.28);
}

.video-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #100703;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  color: #fff;
  border: 0;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28), rgba(23, 11, 5, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--gold));
  box-shadow: 0 18px 50px rgba(249, 115, 22, 0.38);
}

.player-overlay strong {
  font-size: 20px;
}

.video-panel.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

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

.detail-content article {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 16px 44px rgba(154, 52, 18, 0.08);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  background: #431407;
  color: #fff7ed;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
}

.site-footer strong {
  font-size: 24px;
}

.site-footer p {
  color: rgba(255, 247, 237, 0.76);
}

.footer-links {
  justify-content: end;
  align-content: start;
}

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

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .site-nav,
  .search-form {
    display: none;
  }

  body.nav-open .site-nav,
  body.nav-open .search-form {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
  }

  body.nav-open .site-nav {
    flex-wrap: wrap;
    justify-content: start;
  }

  body.nav-open .search-form input {
    width: 100%;
  }

  .hero-slide,
  .detail-layout,
  .two-columns,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 320px;
  }

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .header-inner,
  .section-wrap,
  .hero,
  .page-hero,
  .detail-hero,
  .footer-inner {
    width: min(100% - 20px, 1280px);
  }

  .hero {
    min-height: 760px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-poster,
  .detail-poster {
    min-height: 300px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    gap: 14px;
  }

  .rank-cover {
    min-height: 190px;
  }

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

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