:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(251, 146, 60, 0.22);
  --brand: #ea580c;
  --brand-dark: #9a3412;
  --accent: #f59e0b;
  --shadow: 0 24px 70px rgba(124, 45, 18, 0.16);
}

* {
  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", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.2), transparent 28rem), var(--bg);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 251, 235, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c, #dc2626);
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.28);
}

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

.site-nav a {
  color: #78350f;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.site-nav a:hover {
  background: rgba(245, 158, 11, 0.18);
  color: #9a3412;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #7c2d12;
  background: rgba(245, 158, 11, 0.18);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  cursor: pointer;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-bg::after,
.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 10%, rgba(251, 191, 36, 0.28), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  padding: 82px 0 118px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 420px);
  gap: 56px;
  align-items: center;
  color: #ffffff;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-intro p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 237, 213, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-list span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: rgba(255, 237, 213, 0.9);
  font-size: 13px;
  font-weight: 800;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.32);
}

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

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster img,
.poster-link img,
.detail-cover img,
.ranking-poster img,
.category-tile img,
.category-cover-stack img {
  height: 100%;
  object-fit: cover;
}

.hero-control {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
}

.hero-control button {
  border: 0;
  cursor: pointer;
}

.hero-control > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 30px;
  line-height: 1;
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: #fbbf24;
}

.quick-search {
  margin-top: -34px;
  position: relative;
  z-index: 6;
}

.search-panel,
.filter-panel {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.search-panel input,
.filter-panel input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(251, 146, 60, 0.34);
  border-radius: 18px;
  outline: 0;
  color: var(--text);
  background: #fffbeb;
}

.search-panel button,
.filter-panel button {
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: #ffffff;
  background: #ea580c;
  cursor: pointer;
  font-weight: 800;
}

.section-block {
  padding: 58px 0;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--brand);
  font-weight: 900;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
  color: #431407;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(124, 45, 18, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.poster-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(124, 45, 18, 0.8);
  font-weight: 900;
  font-size: 12px;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 10px;
  overflow: hidden;
  color: #431407;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.text-link:hover,
.category-samples a:hover,
.side-links a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffedd5;
}

.movie-card p,
.ranking-info p,
.detail-content p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.compact-card .poster-link {
  aspect-ratio: 4 / 3;
}

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

.compact-card .card-title {
  font-size: 15px;
  min-height: 38px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 28px;
  color: #ffffff;
  background: #431407;
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(12, 10, 9, 0.86));
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.72;
}

.category-tile span,
.category-tile small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile span {
  bottom: 62px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 20px;
  color: #ffedd5;
  line-height: 1.5;
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
}

.ranking-list,
.ranking-page-list,
.side-links {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 1fr auto 50px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.rank-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 900;
}

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

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

.rank-row b {
  color: #ea580c;
}

.subpage-main {
  min-height: 60vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.page-hero {
  padding: 110px 0 86px;
  background-color: #7c2d12;
}

.small-hero {
  background: linear-gradient(135deg, #7c2d12, #ea580c, #f59e0b);
}

.page-hero .container,
.detail-hero-inner {
  position: relative;
  z-index: 2;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(124, 45, 18, 0.08);
}

.category-overview-card h2 {
  margin: 0 0 10px;
  color: #431407;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  aspect-ratio: 1;
}

.category-cover-stack img {
  border-radius: 16px;
  background: #fed7aa;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-samples a,
.text-link {
  color: #9a3412;
  font-weight: 800;
}

.filter-panel {
  flex-wrap: wrap;
  margin-bottom: 24px;
}

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

.filter-chips button {
  height: 38px;
  color: #9a3412;
  background: #ffedd5;
}

.filter-chips button.is-active {
  color: #ffffff;
  background: #ea580c;
}

.ranking-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(124, 45, 18, 0.08);
}

.ranking-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 22px;
  background: #fed7aa;
}

.ranking-poster span {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.9);
  font-weight: 900;
}

.ranking-info h2 {
  margin: 0 0 10px;
  color: #431407;
}

.detail-hero {
  padding: 72px 0;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.large-tags span {
  color: #ffffff;
  background: rgba(234, 88, 12, 0.78);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #0f172a;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
  cursor: pointer;
}

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

.play-button {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 42px rgba(234, 88, 12, 0.36);
  font-size: 34px;
}

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

.detail-content,
.detail-side {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(124, 45, 18, 0.08);
}

.detail-content h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: #431407;
}

.detail-content p + h2 {
  margin-top: 30px;
}

.detail-pager {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-pager a {
  color: #9a3412;
  font-weight: 800;
}

.side-links a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: #fffbeb;
  border: 1px solid var(--line);
  font-weight: 800;
}

.side-links span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.site-footer {
  margin-top: 40px;
  padding: 40px 0;
  color: #fed7aa;
  background: #431407;
}

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

.footer-inner p {
  margin: 8px 0 0;
  color: #fdba74;
}

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

.footer-links a {
  color: #ffedd5;
  font-weight: 800;
}

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .site-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 251, 235, 0.96);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-poster,
  .detail-cover {
    max-width: 360px;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .site-nav {
    top: 64px;
    grid-template-columns: 1fr;
  }

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

  .hero-content {
    padding-top: 42px;
    gap: 28px;
  }

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

  .search-panel,
  .filter-panel {
    display: grid;
  }

  .movie-grid,
  .wide-grid,
  .home-grid,
  .mini-grid,
  .category-grid,
  .category-overview-card,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-row em,
  .rank-row b {
    grid-column: 2;
  }

  .footer-inner {
    display: grid;
  }

  .page-hero,
  .detail-hero {
    padding: 64px 0;
  }
}
