:root {
  --toffee-cream: #fff8f0;
  --toffee-light: #f5e6d3;
  --toffee-primary: #c87941;
  --toffee-secondary: #e5a76b;
  --toffee-caramel: #b8784f;
  --toffee-brown: #8b5a3c;
  --toffee-dark: #6b4423;
  --paper: #ffffff;
  --ink: #3d2414;
  --muted: rgba(139, 90, 60, 0.74);
  --shadow-cloud: 0 8px 32px rgba(200, 121, 65, 0.12);
  --shadow-heavy: 0 22px 60px rgba(107, 68, 35, 0.18);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(229, 167, 107, 0.22), transparent 30vw),
    radial-gradient(circle at 90% 0%, rgba(245, 230, 211, 0.9), transparent 34vw),
    linear-gradient(180deg, #fffaf4 0%, #fff8f0 40%, #ffffff 100%);
}

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

img {
  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: 80;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.52));
  backdrop-filter: blur(14px);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-cloud);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--toffee-dark);
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
  box-shadow: 0 12px 24px rgba(200, 121, 65, 0.24);
  animation: float 6s ease-in-out infinite;
}

.logo-text {
  font-size: clamp(18px, 2vw, 24px);
  background: linear-gradient(90deg, var(--toffee-primary), var(--toffee-secondary), var(--toffee-caramel));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--toffee-dark);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--toffee-primary);
  background: rgba(245, 230, 211, 0.72);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(245, 230, 211, 0.9);
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.9);
}

.header-search input,
.mobile-search input {
  width: 210px;
  padding: 10px 14px;
  color: var(--toffee-dark);
  border: 0;
  outline: none;
  background: transparent;
}

.header-search button,
.mobile-search button {
  height: 100%;
  padding: 10px 16px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(245, 230, 211, 0.65);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--toffee-dark);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(245, 230, 211, 0.7);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px auto;
  width: min(720px, 100%);
}

.mobile-search {
  width: min(720px, 100%);
  margin: 0 auto;
}

.mobile-search input {
  width: 100%;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  padding: 42px 0 56px;
}

.hero-bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.72;
  pointer-events: none;
}

.hero-bg-orb-one {
  width: 420px;
  height: 420px;
  left: -120px;
  top: 22px;
  background: radial-gradient(circle, rgba(229, 167, 107, 0.36), transparent 66%);
}

.hero-bg-orb-two {
  width: 520px;
  height: 520px;
  right: -180px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(200, 121, 65, 0.25), transparent 66%);
}

.hero-container {
  position: relative;
}

.hero-slide {
  display: none;
  align-items: center;
  min-height: 520px;
  gap: 42px;
  padding: 42px;
  border: 1px solid rgba(245, 230, 211, 0.92);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 240, 0.82)),
    radial-gradient(circle at top right, rgba(229, 167, 107, 0.28), transparent 40%);
  box-shadow: var(--shadow-heavy);
  animation: fadeIn 0.6s ease both;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  color: var(--toffee-primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: rgba(245, 230, 211, 0.74);
}

.hero-copy h1,
.simple-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--toffee-dark);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-line {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--toffee-brown);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.7;
}

.hero-meta,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.hero-meta span,
.movie-meta-line span {
  padding: 6px 10px;
  color: var(--toffee-brown);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(245, 230, 211, 0.68);
}

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

.compact-actions {
  margin-top: 22px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
  box-shadow: 0 14px 30px rgba(200, 121, 65, 0.24);
}

.btn-ghost {
  color: var(--toffee-dark);
  border: 1px solid rgba(200, 121, 65, 0.28);
  background: rgba(255, 255, 255, 0.74);
}

.btn.full {
  width: 100%;
}

.hero-art,
.poster-link,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(200, 121, 65, 0.82), rgba(229, 167, 107, 0.72)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.42), transparent 42%);
  box-shadow: var(--shadow-cloud);
}

.hero-art {
  min-height: 410px;
}

.hero-art::after,
.poster-link::after,
.detail-poster::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.46));
  pointer-events: none;
}

.hero-art img,
.poster-link img,
.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.hero-art:hover img,
.poster-link:hover img {
  transform: scale(1.045);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
}

.hero-fallback {
  font-size: 34px;
}

.poster-link img,
.hero-art img,
.detail-poster img {
  position: relative;
  z-index: 1;
}

.poster-link img.is-missing,
.hero-art img.is-missing,
.detail-poster img.is-missing {
  opacity: 0;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(200, 121, 65, 0.32);
  transition: width 0.2s ease, background 0.2s ease;
}

.carousel-dot.is-active {
  width: 34px;
  background: var(--toffee-primary);
}

.content-section {
  padding: 34px 0;
}

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

.section-heading h2 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--toffee-dark);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading h2::after {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 54%;
  height: 4px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, var(--toffee-primary), var(--toffee-secondary));
}

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

.section-more {
  color: var(--toffee-primary);
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.text-card,
.hot-aside,
.movie-card {
  border: 1px solid rgba(245, 230, 211, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-cloud);
}

.category-card,
.category-overview-card {
  padding: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 36px;
}

.category-card strong,
.category-overview-card strong {
  display: block;
  color: var(--toffee-dark);
  font-size: 20px;
}

.category-card em,
.category-overview-card em {
  display: block;
  margin-top: 6px;
  color: var(--toffee-primary);
  font-style: normal;
  font-weight: 800;
}

.category-card small,
.category-overview-card p {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.category-topline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-topline span {
  font-size: 34px;
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-link {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--toffee-dark);
  font-size: 19px;
  line-height: 1.35;
}

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

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

.tag-row {
  margin-top: 14px;
}

.tag-row span,
.detail-tags a,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: var(--toffee-dark);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(245, 230, 211, 0.68);
}

.tag-cloud a {
  padding: 10px 14px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.tag-cloud a:hover {
  color: #fff;
  background: var(--toffee-secondary);
  transform: translateY(-2px);
}

.tag-cloud span {
  color: var(--toffee-primary);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
  box-shadow: 0 10px 20px rgba(107, 68, 35, 0.22);
}

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

.list-stack {
  display: grid;
  gap: 14px;
}

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

.movie-card-list .poster-link {
  height: 100%;
  min-height: 154px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.hot-aside {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.hot-aside h2 {
  margin: 0 0 10px;
  color: var(--toffee-dark);
}

.hot-aside p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.hot-aside ol {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.hot-aside li a {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(245, 230, 211, 0.9);
}

.hot-aside li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #fff;
  border-radius: 10px;
  background: var(--toffee-primary);
}

.hot-aside li em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0;
  background:
    radial-gradient(circle at 78% 15%, rgba(229, 167, 107, 0.26), transparent 28vw),
    linear-gradient(135deg, rgba(255, 248, 240, 0.92), rgba(255, 255, 255, 0.72));
}

.simple-hero p {
  max-width: 760px;
  color: var(--toffee-brown);
  font-size: 18px;
  line-height: 1.8;
}

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

.ranking-stack .movie-card-list:nth-child(-n + 3) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 240, 0.92));
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  max-width: 900px;
  margin-top: 24px;
}

.search-panel input,
.search-panel select,
.search-panel button {
  min-height: 48px;
  padding: 0 14px;
  color: var(--toffee-dark);
  border: 1px solid rgba(200, 121, 65, 0.18);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
}

.search-panel button {
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.result-line {
  margin-bottom: 18px;
  color: var(--toffee-brown);
  font-weight: 800;
}

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

.detail-poster {
  aspect-ratio: 3 / 4;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--toffee-primary);
  font-weight: 800;
}

.breadcrumb em {
  font-style: normal;
}

.detail-one-line {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--toffee-brown);
  font-size: 20px;
  line-height: 1.7;
}

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

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid rgba(245, 230, 211, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.detail-meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111;
  box-shadow: var(--shadow-heavy);
}

.hls-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
}

.player-start.is-hidden {
  display: none;
}

.player-start span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.detail-text-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.text-card {
  padding: 26px;
}

.text-card h2 {
  margin: 0 0 12px;
  color: var(--toffee-dark);
}

.text-card p {
  margin: 0;
  color: var(--toffee-brown);
  line-height: 1.9;
}

.site-footer {
  margin-top: 44px;
  padding: 42px 0;
  color: var(--toffee-brown);
  border-top: 1px solid rgba(245, 230, 211, 0.9);
  background: rgba(255, 255, 255, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 460px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--toffee-dark);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 9px 0;
}

.site-footer a:hover {
  color: var(--toffee-primary);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .hot-aside {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-slide.is-active {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px;
  }

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

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

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

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

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

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

  .header-inner {
    height: 64px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .hero-shell {
    padding-top: 22px;
  }

  .hero-slide.is-active {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-copy h1,
  .simple-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-art {
    min-height: 260px;
  }

  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .detail-meta-grid,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

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

  .movie-card-list .poster-link {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}
