:root {
  --bg: #fffaf2;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f2dfc7;
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #ea580c;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.13);
  --shadow-strong: 0 24px 70px rgba(120, 53, 15, 0.22);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 35px rgba(120, 53, 15, 0.12);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: transparent;
  background: linear-gradient(90deg, var(--amber-dark), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.nav-link {
  position: relative;
  color: #4b5563;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--amber);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(217, 119, 6, 0.22);
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.08);
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 10px 8px 14px;
  background: transparent;
}

.header-search button,
.primary-btn,
.ghost-btn,
.section-link {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.header-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.25);
}

.header-search button {
  padding: 8px 16px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-strong);
}

.primary-btn.small {
  padding: 10px 18px;
  font-size: 14px;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(12px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(217, 119, 6, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav {
  display: grid;
  gap: 6px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: #78350f;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 10%, rgba(251, 191, 36, 0.46), transparent 35%), linear-gradient(135deg, #92400e, #ea580c 45%, #f59e0b);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(67, 20, 7, 0.78), rgba(120, 53, 15, 0.46), rgba(255, 255, 255, 0.02));
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: saturate(1.15) contrast(1.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 760px;
  padding-top: 138px;
  padding-bottom: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 60px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
}

.eyebrow {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 4px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  color: #fde68a;
  font-size: clamp(28px, 4vw, 44px);
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #fff7ed;
  font-size: 18px;
}

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

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--amber-dark);
  background: #ffedd5;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 800;
}

.hero .hero-tags span,
.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: var(--shadow-strong);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  z-index: 2;
}

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

.hero-poster span {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 3;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.stats-section {
  margin-top: -42px;
  position: relative;
  z-index: 6;
}

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

.stat-card,
.category-tile,
.movie-card,
.hot-panel,
.ranking-list-panel,
.content-card,
.side-card,
.player-card {
  background: var(--surface);
  border: 1px solid rgba(217, 119, 6, 0.13);
  box-shadow: var(--shadow);
}

.stat-card {
  border-radius: 22px;
  padding: 24px;
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--amber-dark);
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.section,
.page-main {
  padding: 84px 0;
}

.soft-section {
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
}

.section-head,
.panel-head,
.category-tile-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-head h2,
.panel-head h2,
.content-card h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.section-head p,
.section-desc,
.category-tile p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-kicker {
  padding: 6px 12px;
  color: var(--amber-dark);
  background: #ffedd5;
  font-size: 14px;
}

.section-link,
.panel-head a {
  color: var(--amber-dark);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 10px 16px;
  font-weight: 800;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
  align-items: start;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.category-chips a {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--amber-dark);
  background: #ffffff;
  border: 1px solid #fed7aa;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.08);
  font-weight: 800;
}

.hot-panel,
.ranking-list-panel,
.content-card,
.side-card,
.player-card {
  border-radius: var(--radius);
  padding: 24px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3e5d2;
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-radius: 12px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, #f59e0b, #7c2d12);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.68));
  opacity: 0.9;
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--amber-dark);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.movie-card:hover .play-dot {
  transform: translateY(0);
  opacity: 1;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--amber-dark);
  font-size: 12px;
  font-weight: 900;
}

.card-body h2 {
  margin: 8px 0;
  font-size: 20px;
  line-height: 1.3;
}

.compact .card-body h2 {
  font-size: 16px;
}

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.compact .card-body p {
  display: none;
}

.page-main {
  padding-top: 78px;
}

.page-hero {
  padding: 86px 0 70px;
  color: #ffffff;
  background: radial-gradient(circle at 78% 10%, rgba(251, 191, 36, 0.42), transparent 34%), linear-gradient(135deg, #7c2d12, #ea580c 58%, #f59e0b);
}

.page-hero h1 {
  max-width: 820px;
  margin: 16px 0 10px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #fff7ed;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-tile {
  border-radius: var(--radius);
  padding: 26px;
}

.category-tile-head {
  align-items: center;
  margin-bottom: 10px;
}

.category-tile-head span {
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
}

.category-tile-head strong {
  color: var(--amber-dark);
  background: #ffedd5;
  border-radius: 999px;
  padding: 5px 12px;
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0 20px;
}

.mini-posters img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(145deg, #f59e0b, #7c2d12);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  margin-bottom: 26px;
  border: 1px solid #fed7aa;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.08);
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
  min-height: 46px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 0 16px;
  outline: 0;
  background: #fffaf2;
}

.filter-bar input {
  flex: 1 1 360px;
}

.filter-bar select {
  flex: 0 0 170px;
}

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

.ranking-list-panel {
  position: sticky;
  top: 98px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 128px 0 70px;
  color: #ffffff;
  background: #7c2d12;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 10%, rgba(251, 191, 36, 0.42), transparent 34%), linear-gradient(135deg, #7c2d12, #ea580c);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(67, 20, 7, 0.92), rgba(67, 20, 7, 0.62), rgba(67, 20, 7, 0.2));
}

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

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  background: linear-gradient(145deg, #f59e0b, #7c2d12);
}

.detail-poster-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.06;
}

.detail-copy p {
  max-width: 830px;
  color: #fff7ed;
  font-size: 18px;
}

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

.detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 800;
}

.player-card {
  padding: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.32), transparent 30%), #111827;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #111827;
}

.play-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.42);
  cursor: pointer;
}

.play-trigger span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--amber-dark);
  background: #ffffff;
  box-shadow: var(--shadow-strong);
  font-size: 32px;
}

.play-trigger strong {
  font-size: 18px;
}

.video-shell.playing .play-trigger {
  display: none;
}

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

.content-card h2,
.side-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
}

.content-card p {
  color: #4b5563;
  margin: 0 0 28px;
  font-size: 17px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

.info-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f3e5d2;
}

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

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

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 26px;
}

.search-page-form input {
  flex: 1 1 auto;
  background: rgba(255, 255, 255, 0.92);
}

.site-footer {
  padding: 58px 0;
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
  border-top: 1px solid #fed7aa;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  color: #92400e;
  margin: 8px 0;
  font-weight: 700;
}

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

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

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

  .ranking-list-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 126px;
    gap: 28px;
  }

  .hero-poster {
    min-height: 340px;
    transform: none;
  }

  .hero-poster-img {
    min-height: 340px;
  }

  .stats-grid,
  .category-grid-large,
  .footer-grid,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }

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

  .rank-info {
    display: none;
  }
}

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

  .brand-text strong {
    font-size: 18px;
  }

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

  .card-body {
    padding: 14px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .section,
  .page-main {
    padding: 56px 0;
  }

  .page-main {
    padding-top: 78px;
  }

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

  .filter-bar input,
  .filter-bar select {
    flex: 1 1 100%;
  }

  .section-head,
  .panel-head,
  .category-tile-head,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }
}
