:root {
  --color-bg: #fff7ed;
  --color-bg-soft: #fffbeb;
  --color-card: #ffffff;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-primary: #d97706;
  --color-primary-dark: #92400e;
  --color-primary-soft: #fef3c7;
  --color-accent: #ea580c;
  --color-border: #fde68a;
  --shadow-card: 0 16px 35px rgba(146, 64, 14, 0.12);
  --shadow-hover: 0 24px 45px rgba(146, 64, 14, 0.2);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.2), transparent 36rem),
    linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fff7ed 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.95), rgba(255, 237, 213, 0.95));
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
}

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

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

.logo-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.28);
}

.logo-text {
  font-size: 1.35rem;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--color-primary-dark);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 16px 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: #451a03;
}

.hero-slides {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  background-image:
    linear-gradient(90deg, rgba(69, 26, 3, 0.92), rgba(120, 53, 15, 0.68), rgba(0, 0, 0, 0.16)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.25), transparent 22rem),
    linear-gradient(0deg, rgba(69, 26, 3, 0.92), transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 48px;
  align-items: center;
  min-height: 600px;
  padding-top: 60px;
  color: white;
}

.hero-copy h1 {
  margin: 16px 0;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  color: #fde68a;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f59e0b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-primary-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.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);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 16px 28px rgba(234, 88, 12, 0.28);
}

.btn-ghost {
  color: #fff7ed;
  border: 1px solid rgba(253, 230, 138, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn-panel {
  width: 100%;
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
}

.hero-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 10px solid rgba(255, 255, 255, 0.25);
  border-radius: 32px;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img,
.poster-img {
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.hero-toolbar {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-search,
.search-panel,
.filter-bar {
  display: flex;
  gap: 10px;
  width: min(100%, 560px);
  padding: 8px;
  border: 1px solid rgba(253, 230, 138, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 35px rgba(69, 26, 3, 0.18);
}

.hero-search input,
.search-panel input,
.filter-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--color-text);
}

.hero-search button,
.search-panel button,
.filter-bar button {
  flex: 0 0 auto;
  border: 0;
  color: white;
  background: var(--color-primary);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
}

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

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

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

.home-stats-wrap {
  margin-top: -44px;
  position: relative;
  z-index: 8;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.hero-stats div {
  padding: 26px;
  border: 1px solid rgba(253, 230, 138, 0.8);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-card);
}

.hero-stats strong {
  display: block;
  color: var(--color-primary-dark);
  font-size: 2.2rem;
  line-height: 1;
}

.hero-stats span {
  color: var(--color-muted);
  font-weight: 700;
}

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

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

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

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

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

.category-card,
.movie-card,
.content-card,
.rank-panel,
.search-panel,
.player-shell {
  border: 1px solid rgba(253, 230, 138, 0.72);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.category-card,
.movie-card,
.content-card,
.rank-panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.category-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 150px;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.category-thumb-grid img {
  height: 150px;
  object-fit: cover;
}

.category-card-body,
.movie-card-body {
  padding: 20px;
}

.category-card h2,
.movie-card h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.category-card p,
.movie-card p,
.rank-card p,
.content-card p {
  color: var(--color-muted);
}

.category-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--color-primary-dark);
  font-weight: 800;
}

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

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

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.poster-wrap,
.poster-wrap img {
  display: block;
  width: 100%;
  height: 100%;
}

.movie-card img {
  transition: transform 0.45s ease;
}

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

.badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary-dark);
  backdrop-filter: blur(8px);
}

.badge-top {
  top: 12px;
  right: 12px;
}

.badge-bottom {
  left: 12px;
  bottom: 12px;
}

.card-tags {
  margin: 0 0 12px;
}

.card-tags span {
  min-height: 24px;
  padding: 3px 9px;
  background: #fef3c7;
  font-size: 0.75rem;
}

.movie-card h2 a:hover,
.rank-title:hover,
.mini-title:hover {
  color: var(--color-primary);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9ca3af;
  font-size: 0.85rem;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.rank-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #fffbeb);
}

.rank-panel h2 {
  margin: 0 0 6px;
}

.rank-panel ol {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rank-panel li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #fff7ed;
}

.rank-panel li span {
  color: var(--color-primary);
  font-weight: 900;
}

.rank-panel li a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 750;
}

.rank-panel li em {
  color: #9ca3af;
  font-style: normal;
  font-size: 0.82rem;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #431407);
  color: white;
}

.small-hero .container {
  padding: 64px 0;
}

.page-hero h1,
.detail-copy h1 {
  margin: 12px 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  color: #fde68a;
  font-size: 1.08rem;
}

.quick-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.quick-meta span,
.breadcrumbs a,
.breadcrumbs span {
  color: #fed7aa;
}

.breadcrumbs {
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.breadcrumbs a:hover {
  color: white;
}

.filter-bar {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.filter-row button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 13px;
  color: #4b5563;
  background: #fff;
}

.filter-row button:hover,
.filter-row button.is-active {
  color: white;
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.listing-count {
  margin: 18px 0;
  color: var(--color-primary-dark);
  font-weight: 800;
}

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

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

.ranking-feature {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 18px;
  color: white;
  border-radius: var(--radius-lg);
  background-image:
    linear-gradient(180deg, transparent 20%, rgba(69, 26, 3, 0.95)),
    var(--feature-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
}

.ranking-feature span {
  color: #fbbf24;
  font-weight: 900;
}

.ranking-feature strong {
  font-size: 1.2rem;
}

.ranking-feature em {
  color: #fde68a;
  font-style: normal;
}

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

.rank-list > div.rank-number {
  display: none;
}

.rank-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(253, 230, 138, 0.72);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(146, 64, 14, 0.08);
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: #fed7aa;
}

.rank-title,
.mini-title {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 850;
}

.rank-meta,
.mini-card p {
  color: #9ca3af;
  font-size: 0.9rem;
}

.detail-hero {
  min-height: 640px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(67, 20, 7, 0.96), rgba(120, 53, 15, 0.7), rgba(0, 0, 0, 0.2)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(67, 20, 7, 0.38);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 54px 0 70px;
}

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

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 10px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.detail-one-line {
  max-width: 820px;
  color: #fde68a;
  font-size: 1.15rem;
}

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

.detail-meta-grid div {
  padding: 16px;
  border: 1px solid rgba(253, 230, 138, 0.35);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-meta-grid dt {
  color: #fed7aa;
  font-size: 0.82rem;
}

.detail-meta-grid dd {
  margin: 4px 0 0;
  color: white;
  font-weight: 800;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(251, 191, 36, 0.28), transparent 18rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.88));
}

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

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.42);
  font-size: 2rem;
}

.player-overlay strong {
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.player-overlay em {
  color: #fde68a;
  font-style: normal;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin-top: 0;
  color: #111827;
}

.search-page .search-panel {
  width: 100%;
  margin-bottom: 18px;
  border-radius: 20px;
}

.search-status {
  margin-bottom: 22px;
  color: var(--color-primary-dark);
  font-weight: 800;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
}

.mini-cover {
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 14px;
  background: #fed7aa;
}

.site-footer {
  margin-top: 60px;
  color: #fde68a;
  background: linear-gradient(135deg, #78350f, #431407);
}

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

.footer-grid h2 {
  margin-top: 0;
  color: white;
  font-size: 1.1rem;
}

.footer-grid p,
.footer-links a {
  color: #fed7aa;
}

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

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #fed7aa;
  border-top: 1px solid rgba(253, 230, 138, 0.18);
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout,
  .home-split {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-features {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero,
  .hero-slides {
    min-height: 760px;
  }

  .hero-content {
    min-height: 690px;
    padding-top: 36px;
    gap: 26px;
  }

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

  .hero-search,
  .search-panel,
  .filter-bar {
    border-radius: 18px;
  }

  .hero-stats,
  .category-grid,
  .movie-grid,
  .compact-grid,
  .mini-grid,
  .ranking-features,
  .detail-meta-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .detail-layout {
    gap: 24px;
  }

  .rank-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .small-hero .container,
  .detail-hero-inner {
    padding: 42px 0;
  }
}
