:root {
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #f97316;
  --primary-dark: #7c2d12;
  --primary-deep: #431407;
  --line: rgba(124, 45, 18, 0.12);
  --card: #ffffff;
  --shadow: 0 20px 60px rgba(124, 45, 18, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #ffffff 42%, var(--bg-soft));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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;
  color: #ffffff;
  background: linear-gradient(90deg, #431407, #78350f 54%, #9a3412);
  box-shadow: 0 14px 40px rgba(67, 20, 7, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), 0 10px 24px rgba(249, 115, 22, .24);
}

.brand-text {
  font-size: 21px;
}

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

.nav-link {
  color: rgba(255, 255, 255, .86);
  font-weight: 650;
  transition: color .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fde68a;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  backdrop-filter: blur(10px);
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 7px 8px 7px 12px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, .72);
}

.header-search button,
.btn,
.search-panel button,
.large-search button {
  border: 0;
  border-radius: 999px;
  color: #431407;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(249, 115, 22, .26);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.header-search button {
  padding: 7px 15px;
}

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

.btn:hover,
.header-search button:hover,
.search-panel button:hover,
.large-search button:hover {
  transform: translateY(-2px);
  filter: saturate(1.06);
  box-shadow: 0 18px 36px rgba(249, 115, 22, .34);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
  backdrop-filter: blur(10px);
}

.btn.wide {
  width: 100%;
  margin-top: 18px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .13);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #ffffff;
}

.hero-slider {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  color: #ffffff;
  background: #431407;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  transition: opacity .7s ease, transform 1.1s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: radial-gradient(circle at 20% 20%, rgba(253, 230, 138, .8), transparent 24%), radial-gradient(circle at 78% 40%, rgba(249, 115, 22, .7), transparent 25%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fcd34d;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -.04em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.movie-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span,
.detail-tags a {
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 750;
}

.hero-tags span,
.detail-meta span,
.detail-tags a {
  color: #fff7ed;
  background: rgba(255, 255, 255, .15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  transition: width .2s ease, background .2s ease;
}

.hero-dot.active {
  width: 28px;
  background: #fcd34d;
}

.band {
  background: linear-gradient(90deg, rgba(255, 251, 235, .92), rgba(255, 237, 213, .72));
  border-bottom: 1px solid var(--line);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 34px 0;
}

.quick-search h2 {
  margin: 0 0 8px;
  color: #431407;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.1;
}

.quick-search p {
  margin: 0;
  color: var(--muted);
}

.large-search,
.search-panel {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.large-search input,
.search-panel input,
.search-panel select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--text);
  background: #fff7ed;
}

.large-search button,
.search-panel button {
  padding: 0 22px;
}

.section {
  padding: 58px 0;
}

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

.section-head h2,
.panel-head h2 {
  margin: 0;
  color: #431407;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.1;
  font-weight: 950;
}

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

.section-more {
  flex: 0 0 auto;
  color: #c2410c;
  font-weight: 850;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(124, 45, 18, .08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(249, 115, 22, .34);
  box-shadow: 0 22px 56px rgba(124, 45, 18, .18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at 35% 25%, rgba(253, 230, 138, .86), transparent 32%), linear-gradient(135deg, #7c2d12, #f97316);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .62));
  opacity: .88;
}

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #431407;
  background: #fcd34d;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}

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

.movie-meta span {
  color: #c2410c;
  background: #ffedd5;
}

.movie-card h3 {
  margin: 11px 0 8px;
  color: #431407;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 880;
}

.movie-card p {
  min-height: 46px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 760;
}

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

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

.category-tile {
  min-height: 150px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #c2410c, #f97316 48%, #f59e0b);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-tile:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 28px 70px rgba(194, 65, 12, .26);
}

.category-tile span {
  display: block;
  font-size: 36px;
  margin-bottom: 18px;
}

.category-tile strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, .76);
  font-style: normal;
}

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

.ranking-panel,
.side-card {
  position: sticky;
  top: 88px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.rank-list.full {
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff7ed;
  transition: transform .2s ease, background .2s ease;
}

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

.rank-num {
  width: 28px;
  color: #f97316;
  font-weight: 950;
  text-align: center;
}

.rank-cover {
  width: 58px;
  height: 44px;
  border-radius: 14px;
  background-position: center;
  background-size: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info strong {
  color: #431407;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: #c2410c;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background: linear-gradient(120deg, #431407, #78350f 52%, #c2410c);
}

.page-hero {
  padding: 76px 0;
}

.page-hero.compact {
  padding: 56px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 950;
}

.page-hero p {
  max-width: 740px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pager a,
.pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 780;
}

.pager a.current {
  color: #ffffff;
  background: #f97316;
}

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

.top-rank-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.top-rank-card span {
  color: #fcd34d;
  font-weight: 950;
}

.top-rank-card h2 {
  margin: 10px 0 10px;
  font-size: 26px;
  line-height: 1.12;
}

.top-rank-card p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .8);
}

.top-rank-card strong {
  font-size: 28px;
  color: #fde68a;
}

.narrow {
  max-width: 900px;
}

.search-panel {
  max-width: 980px;
  margin-top: 24px;
}

.detail-hero {
  padding: 64px 0;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 6px solid rgba(255, 255, 255, .18);
  border-radius: 28px;
  background: linear-gradient(135deg, #7c2d12, #f97316);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .36);
}

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

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5.8vw, 70px);
  line-height: 1.05;
  font-weight: 950;
}

.detail-intro p {
  max-width: 830px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, .84);
  font-size: 18px;
}

.detail-tags {
  margin-top: 14px;
}

.player-section {
  padding-bottom: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: #130904;
  box-shadow: 0 30px 90px rgba(67, 20, 7, .34);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, .28), rgba(0, 0, 0, .64));
  cursor: pointer;
  transition: opacity .25s ease, visibility .25s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #431407;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  font-size: 32px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .36);
}

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

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fecaca;
  text-align: center;
  pointer-events: none;
}

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

.detail-block {
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(124, 45, 18, .08);
}

.detail-block h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #431407;
  font-size: 26px;
  line-height: 1.15;
}

.detail-block p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #431407;
  font-weight: 760;
}

.site-footer {
  margin-top: 40px;
  color: rgba(255, 255, 255, .82);
  background: linear-gradient(90deg, #431407, #78350f);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.footer-inner strong {
  color: #fde68a;
  font-size: 20px;
}

.footer-inner p {
  max-width: 680px;
  margin: 8px 0 0;
}

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

.footer-links a {
  color: #fde68a;
  font-weight: 760;
}

@media (max-width: 1024px) {
  .header-search {
    display: none;
  }

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

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

  .ranking-panel,
  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 16px;
  }

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

  .nav-link {
    padding: 10px 0;
  }

  .hero-slider {
    min-height: 640px;
  }

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

  .quick-search-inner,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .large-search,
  .search-panel {
    flex-direction: column;
    border-radius: 22px;
  }

  .large-search button,
  .search-panel button {
    min-height: 46px;
  }

  .movie-grid,
  .category-grid,
  .category-grid.small,
  .top-rank-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: 210px;
  }

  .rank-item {
    grid-template-columns: auto 52px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}
