:root {
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fde68a;
  --gold: #f59e0b;
  --gold-dark: #d97706;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 52%, #fef3c7 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 235, 0.92);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(146, 64, 14, 0.08);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: rotate(10deg) scale(1.04);
}

.brand-text,
.footer-brand strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #d97706, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #4b5563;
  font-weight: 650;
  padding: 9px 0;
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.mobile-menu input,
.filter-bar input,
.filter-bar select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0 16px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
  width: 250px;
}

.nav-search input:focus,
.mobile-menu input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.nav-search button,
.mobile-menu button,
.primary-btn,
.wide-link {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  font-weight: 750;
  padding: 11px 20px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.primary-btn:hover,
.wide-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 25px rgba(249, 115, 22, 0.26);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(254, 243, 199, 0.8);
  border-radius: 12px;
  font-size: 24px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 12px;
}

.mobile-menu a {
  padding: 10px 0;
  color: #4b5563;
  font-weight: 700;
}

.mobile-menu form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  max-width: 720px;
  left: max(16px, calc((100vw - 1240px) / 2));
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.hero-tags,
.detail-meta,
.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.9);
  color: #ffffff;
  font-weight: 700;
}

.hero-tags {
  margin: 16px 0 28px;
}

.hero-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fef3c7;
  backdrop-filter: blur(8px);
}

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

.ghost-btn {
  border-radius: 999px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 11px 20px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section,
.inner-page,
.detail-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

.section-head h2,
.rank-panel-head h2,
.page-hero h1,
.detail-card h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 18px rgba(146, 64, 14, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card-compact .poster-frame {
  aspect-ratio: 4 / 5;
}

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

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

.type-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: #ffffff;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.type-badge {
  top: 10px;
  right: 10px;
  background: rgba(245, 158, 11, 0.9);
}

.year-badge {
  left: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.65);
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  line-height: 1.35;
  font-size: 17px;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong {
  color: var(--gold-dark);
}

.movie-info em {
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  font-style: normal;
}

.meta-row {
  justify-content: space-between;
  color: #6b7280;
  font-size: 12px;
}

.meta-row span:first-child,
.tag-row span {
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  padding: 5px 9px;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  font-size: 12px;
}

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

.rank-panel,
.side-card,
.detail-card,
.filter-bar,
.page-hero,
.category-card,
.rank-list,
.ranking-list {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  background: transparent;
  box-shadow: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 40px 58px 1fr;
  gap: 12px;
  align-items: center;
}

.rank-no,
.ranking-index {
  color: var(--gold-dark);
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item strong {
  font-size: 15px;
  line-height: 1.35;
}

.rank-item em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.wide-link {
  display: block;
  text-align: center;
}

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

.category-tile,
.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-tile img,
.category-card-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
  transition: transform 0.4s ease;
}

.category-tile:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.category-tile::after,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.08));
}

.category-tile span,
.category-card-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.category-tile strong,
.category-card strong {
  font-size: 22px;
}

.category-tile em,
.category-card em {
  color: #fef3c7;
  font-style: normal;
  font-size: 14px;
  line-height: 1.5;
}

.category-card {
  min-height: 260px;
}

.category-card-covers {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.inner-page,
.detail-page {
  padding: 34px 0 76px;
}

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

.breadcrumb a:hover {
  color: var(--gold-dark);
}

.page-hero {
  padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.92));
  overflow: hidden;
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.page-hero-rank {
  background: linear-gradient(135deg, #451a03, #92400e 55%, #f59e0b);
  color: #ffffff;
}

.page-hero-rank p:last-child,
.page-hero-rank .eyebrow {
  color: #fef3c7;
}

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

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

.empty-state {
  display: none;
  margin: 34px 0 0;
  padding: 30px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-size: 34px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.15;
}

.player-overlay em {
  color: #fef3c7;
  font-style: normal;
  font-weight: 750;
}

.detail-card {
  padding: clamp(22px, 4vw, 34px);
}

.detail-card h1 {
  margin: 0 0 18px;
}

.detail-card h2 {
  margin: 30px 0 10px;
  font-size: 22px;
}

.detail-card p {
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

.lead-text {
  color: #92400e !important;
  font-weight: 750;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.detail-tags a {
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  padding: 8px 13px;
  font-weight: 700;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.detail-cover {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #fef3c7, #ffedd5);
}

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 14px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 700;
}

.related-section {
  padding-top: 48px;
}

.top-three {
  margin-bottom: 28px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 58px minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: #fffbeb;
  transform: translateX(4px);
}

.ranking-row img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-title {
  display: grid;
  gap: 5px;
}

.ranking-title em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.ranking-meta {
  color: #92400e;
  font-weight: 750;
  text-align: right;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.6), rgba(255, 237, 213, 0.9));
  border-top: 1px solid rgba(245, 158, 11, 0.18);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 42px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 16px;
}

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

.footer-links a {
  color: #6b7280;
}

.footer-links a:hover {
  color: var(--gold-dark);
}

.footer-bottom {
  border-top: 1px solid rgba(245, 158, 11, 0.18);
  text-align: center;
  color: #6b7280;
  padding: 18px;
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    width: calc(100% - 36px);
    left: 18px;
    max-width: none;
  }

  .hero-arrow {
    display: none;
  }

  .content-section {
    padding-top: 48px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-info {
    padding: 13px;
  }

  .movie-info strong {
    font-size: 15px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-page,
  .inner-page {
    padding-top: 22px;
  }

  .player-box {
    border-radius: 18px;
  }

  .detail-card,
  .page-hero {
    border-radius: 20px;
  }

  .ranking-row {
    grid-template-columns: 44px 52px 1fr;
  }

  .ranking-meta {
    grid-column: 3;
    text-align: left;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

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

  .hero-content h1 {
    font-size: 40px;
  }
}
