:root {
  --toffee-primary: #C87941;
  --toffee-secondary: #E5A76B;
  --toffee-light: #F5E6D3;
  --toffee-cream: #FFF8F0;
  --toffee-caramel: #B8784F;
  --toffee-brown: #8B5A3C;
  --toffee-dark: #6B4423;
  --cloud-white: #FFFFFF;
  --cloud-soft: #F9F9F9;
  --ink: #2D1B12;
  --muted: rgba(107, 68, 35, 0.72);
  --shadow-cloud: 0 18px 45px rgba(107, 68, 35, 0.14);
  --shadow-glow: 0 18px 42px rgba(200, 121, 65, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--toffee-dark);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 5% 10%, rgba(229, 167, 107, 0.20), transparent 32rem),
    radial-gradient(circle at 90% 20%, rgba(200, 121, 65, 0.14), transparent 30rem),
    linear-gradient(135deg, var(--toffee-cream), #FFFFFF 45%, #F9F0E6);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 230, 211, 0.72);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(107, 68, 35, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.38rem;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--toffee-primary), var(--toffee-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
  box-shadow: var(--shadow-glow);
  animation: float 4s ease-in-out infinite;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--toffee-dark);
  font-size: 0.94rem;
  font-weight: 650;
  transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--toffee-primary);
  background: rgba(245, 230, 211, 0.72);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  width: 220px;
}

.header-search input {
  width: 100%;
  border: 1px solid rgba(200, 121, 65, 0.18);
  border-radius: 999px;
  padding: 10px 40px 10px 16px;
  color: var(--toffee-dark);
  background: rgba(255, 248, 240, 0.72);
  outline: none;
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--toffee-primary);
  background: rgba(245, 230, 211, 0.80);
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 650;
}

.mobile-panel a:hover {
  background: rgba(245, 230, 211, 0.70);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.02);
}

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

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(40, 23, 12, 0.82) 0%, rgba(57, 32, 16, 0.56) 42%, rgba(255, 248, 240, 0.20) 100%),
    linear-gradient(0deg, rgba(255, 248, 240, 0.92) 0%, rgba(255, 248, 240, 0.12) 42%, rgba(255, 248, 240, 0.05) 100%);
}

.hero-content {
  max-width: 720px;
  padding: 110px 0 150px;
  color: white;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(1rem, 2vw, 1.24rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--toffee-dark);
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(10px);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  color: var(--toffee-dark);
  font-weight: 800;
  background: white;
  box-shadow: var(--shadow-cloud);
  transition: 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.hero-thumbs {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 70px;
  display: grid;
  grid-template-columns: repeat(5, 86px);
  gap: 12px;
  z-index: 4;
}

.hero-thumb {
  overflow: hidden;
  height: 62px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

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

.hero-thumb.is-active,
.hero-thumb:hover {
  border-color: var(--toffee-secondary);
  transform: translateY(-3px);
}

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

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(8px);
}

.section {
  padding: 54px 0;
}

.section-tight {
  padding-top: 28px;
}

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

.section-title {
  margin: 0 0 6px;
  color: var(--toffee-dark);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.toffee-card {
  border: 1px solid rgba(245, 230, 211, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-cloud);
  backdrop-filter: blur(10px);
}

.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 121, 65, 0.34);
  box-shadow: var(--shadow-glow);
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  padding: 22px;
}

.category-tile h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 1.24rem;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -44px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(200, 121, 65, 0.24), rgba(229, 167, 107, 0.10));
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(200, 121, 65, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--toffee-dark);
  background: rgba(255, 248, 240, 0.72);
  outline: none;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  min-width: 0;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(135deg, rgba(245, 230, 211, 0.74), rgba(255, 248, 240, 0.82));
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), transparent);
}

.duration-pill,
.score-pill,
.rank-pill {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.duration-pill {
  right: 12px;
}

.score-pill,
.rank-pill {
  left: 12px;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.card-tags {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  padding: 4px 8px;
  color: white;
  font-size: 0.76rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--toffee-dark);
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(107, 68, 35, 0.62);
  font-size: 0.82rem;
}

.card-meta span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 84px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.rank-cover {
  overflow: hidden;
  width: 84px;
  height: 62px;
  border-radius: 16px;
  background: var(--toffee-light);
}

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

.rank-row h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.page-hero-card {
  overflow: hidden;
  padding: 38px;
  background:
    radial-gradient(circle at 10% 10%, rgba(229, 167, 107, 0.26), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 240, 0.78));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--toffee-primary);
  font-weight: 700;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.12;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

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

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #120c08;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #120c08;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.20)),
    radial-gradient(circle at center, rgba(229, 167, 107, 0.20), transparent 24rem);
  transition: 0.25s ease;
}

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

.play-button {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
  box-shadow: 0 18px 60px rgba(229, 167, 107, 0.46);
  transition: 0.25s ease;
}

.play-button:hover {
  transform: scale(1.07);
}

.detail-main,
.detail-side {
  display: grid;
  gap: 20px;
}

.info-card {
  padding: 24px;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 14px;
  color: var(--toffee-dark);
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

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

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(245, 230, 211, 0.82);
  padding-bottom: 10px;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span,
.tag-cloud a {
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--toffee-primary);
  font-size: 0.86rem;
  font-weight: 750;
  background: rgba(245, 230, 211, 0.70);
}

.search-panel {
  padding: 22px;
  margin-bottom: 24px;
}

.search-panel form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 120px;
  gap: 12px;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(245, 230, 211, 0.78);
  background: linear-gradient(135deg, rgba(245, 230, 211, 0.70), rgba(255, 255, 255, 0.82));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
}

.footer-inner p,
.footer-inner a {
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding: 18px 0;
  color: rgba(107, 68, 35, 0.62);
  border-top: 1px solid rgba(245, 230, 211, 0.82);
  font-size: 0.9rem;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
  box-shadow: var(--shadow-glow);
}

.back-top.is-visible {
  display: block;
}

.hidden-by-filter {
  display: none !important;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  body.menu-open .mobile-panel {
    display: block;
  }

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

  .hero-thumbs {
    right: 24px;
    grid-template-columns: repeat(5, 64px);
  }

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

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

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

  .header-inner {
    min-height: 66px;
  }

  .logo {
    font-size: 1.16rem;
  }

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

  .hero-content {
    padding: 86px 0 168px;
  }

  .hero-content h1 {
    letter-spacing: -0.05em;
  }

  .hero-thumbs {
    left: 12px;
    right: 12px;
    bottom: 78px;
    grid-template-columns: repeat(5, 1fr);
  }

  .hero-thumb {
    height: 52px;
    border-radius: 14px;
  }

  .section {
    padding: 38px 0;
  }

  .section-header {
    display: block;
  }

  .section-actions {
    margin-top: 14px;
  }

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

  .filter-bar,
  .search-panel form {
    grid-template-columns: 1fr;
  }

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

  .rank-row .btn {
    grid-column: 2 / -1;
  }

  .page-hero-card {
    padding: 26px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .card-body p {
    min-height: 0;
  }
}
