:root {
  --bg: #fff8ed;
  --surface: #ffffff;
  --surface-soft: #fff3dd;
  --ink: #23180d;
  --muted: #7c6a55;
  --line: rgba(146, 96, 28, 0.18);
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: rgba(245, 158, 11, 0.18);
  --dark: #11100d;
  --dark-soft: #1f1a14;
  --shadow: 0 24px 60px rgba(120, 72, 13, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.24), transparent 34rem),
    linear-gradient(180deg, #fffaf1 0%, var(--bg) 42%, #fff 100%);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  color: #fff;
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.38);
}

.logo-text {
  background: linear-gradient(90deg, #b45309, #7c2d12);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 20px;
}

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

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

.nav-link:hover,
.nav-link.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 290px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  padding: 8px 10px 8px 14px;
  background: transparent;
  color: var(--ink);
}

.header-search button,
.primary-button,
.ghost-button,
.reset-filter,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s ease;
}

.header-search button,
.primary-button,
.reset-filter {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.24);
}

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

.primary-button,
.ghost-button {
  min-height: 46px;
  padding: 0 24px;
}

.primary-button:hover,
.header-search button:hover,
.reset-filter:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(146, 64, 14, 0.32);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-soft);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 3px;
  background: var(--brand-dark);
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 12px;
  border-radius: 12px;
  color: #5d4a34;
  font-weight: 800;
}

.mobile-nav a:hover {
  background: var(--brand-soft);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #100d08;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  background-image:
    linear-gradient(90deg, rgba(17, 16, 13, 0.92) 0%, rgba(17, 16, 13, 0.72) 42%, rgba(17, 16, 13, 0.25) 100%),
    var(--hero-image),
    radial-gradient(circle at 78% 30%, rgba(245, 158, 11, 0.42), transparent 32rem);
  background-position: center;
  background-size: cover;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(245, 158, 11, 0.22), transparent 23rem),
    linear-gradient(180deg, transparent 0%, rgba(17, 16, 13, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 48px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  padding: 96px 0 84px;
}

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

.hero-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 14px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

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

.hero-poster {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(251, 191, 36, 0.24), rgba(146, 64, 14, 0.34)),
    #22160b;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

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

.hero-poster img.is-missing,
.poster-frame img.is-missing {
  display: none;
}

.hero-poster::after,
.poster-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.36));
  pointer-events: none;
}

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

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

.hero-dot.is-active {
  width: 36px;
  background: #f59e0b;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: min(1240px, calc(100% - 32px));
  margin: -42px auto 0;
  position: relative;
  z-index: 4;
}

.stats-strip div {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stats-strip strong {
  display: block;
  color: var(--brand-dark);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.stats-strip span {
  color: var(--muted);
  font-weight: 800;
}

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

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

.section-heading h2,
.filter-card h2,
.ranking-head h2,
.text-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.filter-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-button {
  color: var(--brand-dark);
  font-weight: 900;
}

.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: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px rgba(146, 64, 14, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(217, 119, 6, 0.42);
  box-shadow: 0 28px 60px rgba(146, 64, 14, 0.16);
}

.movie-card.is-hidden,
.searchable-row.is-hidden {
  display: none;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 22rem),
    linear-gradient(145deg, #f59e0b, #92400e 70%);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.64);
  font-size: clamp(28px, 5vw, 58px);
  font-weight: 950;
  letter-spacing: -0.06em;
}

.quality-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(17, 16, 13, 0.76);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

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

.card-meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-meta-row span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--brand-dark);
}

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

.movie-card.is-compact h3 {
  font-size: 17px;
}

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

.movie-card.is-compact p {
  min-height: 45px;
  font-size: 13px;
}

.tag-row span {
  border-color: rgba(217, 119, 6, 0.18);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: start;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  border-radius: 28px;
  background-image:
    linear-gradient(135deg, rgba(17, 16, 13, 0.88), rgba(146, 64, 14, 0.62)),
    var(--tile-image),
    linear-gradient(135deg, #2b1b0a, #d97706);
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.category-tile span,
.category-cover-link span {
  display: block;
  margin-bottom: 8px;
  color: #fcd34d;
  font-weight: 900;
}

.category-tile strong,
.category-cover-link strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

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

.ranking-card,
.text-panel,
.filter-card,
.ranking-list,
.player-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.ranking-head h2 {
  font-size: 28px;
}

.rank-row,
.ranking-list-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid rgba(146, 96, 28, 0.12);
}

.rank-row:first-of-type,
.ranking-list-row:first-of-type {
  border-top: 0;
}

.rank-number {
  color: var(--brand);
  font-weight: 950;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}

.compact-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 340px;
  padding: 94px max(16px, calc((100% - 1240px) / 2)) 60px;
  background:
    radial-gradient(circle at 18% 28%, rgba(245, 158, 11, 0.36), transparent 26rem),
    linear-gradient(135deg, #17130e, #4a2508 70%, #d97706);
}

.compact-hero h1 {
  max-width: 860px;
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.filter-panel {
  width: min(1240px, calc(100% - 32px));
  margin: -36px auto 0;
  position: relative;
  z-index: 4;
}

.filter-card {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 180px 180px 110px;
  gap: 12px;
  align-items: center;
  padding: 18px;
}

.filter-control {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #fffaf2;
  color: var(--ink);
  padding: 0 16px;
}

.reset-filter {
  min-height: 46px;
  padding: 0 16px;
}

.filter-result {
  margin: 10px 18px 0;
  color: var(--brand-dark);
  font-weight: 800;
}

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

.category-overview-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.category-mini-links {
  display: grid;
  gap: 6px;
  margin: 18px 0;
}

.category-mini-links a {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-overview-card .text-button {
  color: #fcd34d;
}

.ranking-list {
  padding: 12px 24px;
}

.ranking-list-row strong,
.ranking-list-row em {
  display: block;
}

.ranking-list-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.detail-hero {
  min-height: 660px;
  background-image:
    linear-gradient(90deg, rgba(17, 16, 13, 0.94), rgba(17, 16, 13, 0.74), rgba(17, 16, 13, 0.3)),
    var(--detail-image),
    linear-gradient(135deg, #17130e, #4a2508);
  background-position: center;
  background-size: cover;
}

.detail-hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 26%, rgba(245, 158, 11, 0.24), transparent 28rem),
    linear-gradient(180deg, transparent, rgba(17, 16, 13, 0.84));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 100px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fcd34d;
}

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

.detail-poster {
  min-height: 480px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 34px 88px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  max-width: 840px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

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

.detail-meta span {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-content {
  display: grid;
  gap: 22px;
}

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

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.16), transparent 18rem),
    #0a0a0a;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.6));
  color: #fff;
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.36);
  font-size: 30px;
}

.play-overlay strong {
  display: block;
  font-size: 18px;
}

.player-card.is-playing .play-overlay {
  display: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  color: #fcd34d;
  font-weight: 800;
  text-align: center;
}

.text-panel {
  padding: 28px;
}

.text-panel p:last-child {
  margin-bottom: 0;
  color: #4f3e2a;
  font-size: 17px;
}

.detail-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.detail-pager a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
}

.site-footer {
  margin-top: 90px;
  background: #11100d;
  color: rgba(255, 255, 255, 0.76);
}

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

.footer-logo {
  color: #fff;
}

.site-footer p {
  max-width: 580px;
}

.site-footer h2 {
  color: #fff;
  font-size: 18px;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
}

.site-footer a:hover {
  color: #fcd34d;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .site-header.is-open .mobile-nav {
    display: block;
  }

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

  .hero-poster {
    display: none;
  }

  .ranking-card {
    position: static;
  }

  .filter-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

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

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

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

@media (max-width: 620px) {
  .header-inner {
    width: min(100% - 20px, 1240px);
    height: 64px;
  }

  .logo-text {
    font-size: 17px;
  }

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

  .hero-copy h1,
  .detail-copy h1,
  .compact-hero h1 {
    letter-spacing: -0.04em;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-strip,
  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .filter-card {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding-top: 52px;
  }

  .detail-poster {
    min-height: 380px;
  }

  .footer-inner {
    padding-bottom: 36px;
  }
}
