:root {
  --bg: #fff8ed;
  --surface: #ffffff;
  --surface-soft: #fff3dc;
  --text: #21160d;
  --muted: #776657;
  --line: #f4d7a3;
  --brand: #b45309;
  --brand-dark: #7c2d12;
  --accent: #f97316;
  --accent-strong: #dc2626;
  --shadow: 0 20px 45px rgba(120, 53, 15, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 237, 0.9);
  border-bottom: 1px solid rgba(244, 215, 163, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent-strong));
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--brand-dark);
  background: #ffedd5;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #ffedd5;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
}

.mobile-nav a {
  padding: 12px 8px;
  color: var(--brand-dark);
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #5b2108;
}

.hero-track {
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 48px;
  padding: 92px max(32px, calc((100vw - 1180px) / 2)) 86px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
  background-image:
    linear-gradient(
      115deg,
      rgba(124, 45, 18, 0.96) 0%,
      rgba(194, 65, 12, 0.82) 42%,
      rgba(17, 24, 39, 0.82) 100%
    ),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
}

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

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

.hero-kicker,
.eyebrow {
  margin: 0 0 14px;
  color: #fef3c7;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.hero-slide-title {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 22px;
  font-weight: 800;
}

.hero-summary {
  max-width: 720px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2vw, 24px);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.btn-soft {
  color: #7c2d12;
  background: #fed7aa;
}

.btn-ghost-dark {
  color: var(--brand-dark);
  background: #ffedd5;
  border: 1px solid #fed7aa;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
  aspect-ratio: 2 / 3;
}

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

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 28px;
}

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

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

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

.quick-search {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: -36px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(244, 215, 163, 0.86);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-strip input,
.filter-panel input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  color: var(--text);
  background: #fffaf3;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  outline: none;
}

.search-strip input:focus,
.filter-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.search-strip button {
  min-height: 50px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent-strong));
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a,
.section-more,
.category-card-link {
  color: var(--brand-dark);
  font-weight: 900;
}

.quick-links a {
  padding: 12px 14px;
  background: #ffedd5;
  border-radius: 999px;
}

.page-section {
  padding: 72px 0 0;
}

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

.section-heading h2,
.sub-hero h1,
.detail-info h1,
.text-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow),
.sub-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.full-grid {
  align-items: stretch;
}

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(244, 215, 163, 0.86);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(120, 53, 15, 0.08);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #fed7aa;
}

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

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

.score-badge,
.rank-badge,
.detail-cover span {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-radius: 999px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.26);
}

.score-badge {
  right: 12px;
  bottom: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.28;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

.category-tile,
.category-card a {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 24px;
  color: #ffffff;
  background-image:
    linear-gradient(180deg, rgba(20, 12, 4, 0.22), rgba(20, 12, 4, 0.82)),
    var(--tile-bg);
  background-size: cover;
  background-position: center;
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.14);
}

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

.category-tile p,
.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.category-card h2 {
  margin: 10px 0 0;
  font-size: 30px;
  line-height: 1.1;
}

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card-compact .poster-link {
  min-height: 154px;
  aspect-ratio: auto;
}

.movie-card-compact .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sub-hero,
.detail-top {
  padding: 72px 0;
  background:
    radial-gradient(
      circle at top right,
      rgba(249, 115, 22, 0.22),
      transparent 34%
    ),
    linear-gradient(135deg, #fff7ed, #ffedd5);
  border-bottom: 1px solid var(--line);
}

.sub-hero h1 {
  max-width: 850px;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(120, 53, 15, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--brand-dark);
  font-weight: 900;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 15px;
  color: var(--brand-dark);
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: #7c2d12;
  font-weight: 800;
}

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

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

.detail-cover span {
  right: 16px;
  bottom: 16px;
}

.detail-info h1 {
  max-width: 850px;
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.detail-meta div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.detail-meta dt {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 900;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 28px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.24);
  aspect-ratio: 16 / 9;
}

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

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58));
  border: 0;
  cursor: pointer;
}

.player-cover-button[hidden] {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding-left: 7px;
  background: linear-gradient(135deg, var(--brand), var(--accent-strong));
  border-radius: 999px;
  box-shadow: 0 24px 48px rgba(220, 38, 38, 0.3);
  font-size: 34px;
}

.text-panel {
  padding: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 14px 36px rgba(120, 53, 15, 0.08);
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

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

.text-panel p {
  margin: 0;
  color: #5f4b38;
  font-size: 18px;
}

.site-footer {
  margin-top: 80px;
  color: #5f4b38;
  background: #fff3dc;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 30px;
  padding: 42px 0;
}

.footer-brand {
  font-size: 24px;
}

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

.footer-links a {
  color: var(--brand-dark);
  font-weight: 800;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.is-hidden {
  display: none !important;
}

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero,
  .hero-track {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 80px 24px 110px;
  }

  .hero-poster {
    width: min(240px, 70vw);
  }

  .hero-controls {
    right: 24px;
    left: 24px;
    justify-content: center;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }

  .search-strip {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    display: grid;
  }

  .detail-layout {
    gap: 28px;
  }

  .detail-cover {
    width: min(280px, 80vw);
  }

  .detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .hero-summary,
  .detail-one-line {
    font-size: 17px;
  }

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

  .movie-card-compact {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .movie-card-compact .poster-link {
    min-height: 132px;
  }

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

  .text-panel {
    padding: 24px;
  }
}
