:root {
  color-scheme: light;
  --bg: #fff8eb;
  --bg-soft: #fffbf2;
  --bg-card: #ffffff;
  --ink: #2d1600;
  --muted: #805a2d;
  --line: #f4d8a9;
  --brand: #b45309;
  --brand-dark: #78350f;
  --brand-soft: #f59e0b;
  --shadow: 0 20px 55px rgba(120, 53, 15, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 42%, #fffaf0 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(180, 83, 9, 0.18);
  background: rgba(255, 248, 235, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-text {
  font-size: clamp(18px, 2vw, 24px);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-dark));
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.35);
  font-size: 15px;
}

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

.nav-link,
.mobile-link {
  color: #6f4413;
  font-weight: 700;
  padding: 10px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: var(--brand);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(180, 83, 9, 0.25);
  border-radius: 999px;
  background: #fff;
}

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

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  color: #fff;
  background: var(--brand);
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(180, 83, 9, 0.12);
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--brand-dark);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-shade,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  padding-right: min(44vw, 520px);
}

.hero-eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #f59e0b;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.detail-meta,
.detail-tags,
.genre-links,
.tag-row,
.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.detail-tags a,
.genre-links a,
.tag-row span,
.link-cloud a {
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-actions,
.detail-info .btn-primary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn-primary,
.btn-ghost,
.section-more,
.quick-entry a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand));
  padding: 14px 24px;
  box-shadow: 0 18px 42px rgba(180, 83, 9, 0.38);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover,
.quick-entry a:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 13px 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

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

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

.quick-entry {
  width: min(1180px, calc(100% - 32px));
  margin: -30px auto 36px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.quick-entry a {
  min-height: 72px;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid rgba(180, 83, 9, 0.16);
  box-shadow: var(--shadow);
}

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

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

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
  margin: 0;
  color: var(--brand-dark);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.section-more {
  color: var(--brand-dark);
  border: 1px solid rgba(180, 83, 9, 0.26);
  background: #fff;
  padding: 10px 16px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(180, 83, 9, 0.13);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 44px rgba(120, 53, 15, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.poster-frame {
  display: block;
  aspect-ratio: 16 / 22;
  overflow: hidden;
}

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

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

.score-badge,
.year-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: #fff;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.score-badge {
  left: 12px;
  background: #f59e0b;
}

.year-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.card-body h3 {
  margin: 9px 0 8px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.28;
}

.card-body p {
  min-height: 50px;
  margin: 0;
  color: #744a18;
  font-size: 14px;
  line-height: 1.75;
}

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

.tag-row span {
  border-color: rgba(180, 83, 9, 0.18);
  background: #fff7ed;
  color: #9a4f05;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 22px;
}

.ranking-panel,
.category-panel,
.overview-card,
.search-panel,
.player-card,
.detail-text article,
.full-ranking {
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 48px rgba(120, 53, 15, 0.08);
}

.ranking-panel {
  padding: 12px;
}

.ranking-row,
.full-rank-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 56px;
  gap: 12px;
  align-items: center;
  padding: 13px 10px;
  border-radius: 15px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover,
.full-rank-row:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.rank-num,
.full-rank-row span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  font-weight: 950;
}

.rank-title,
.full-rank-row strong {
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta,
.full-rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-score,
.full-rank-row b {
  color: #d97706;
  font-weight: 950;
}

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

.category-card,
.overview-card {
  padding: 20px;
  color: var(--brand-dark);
  background: linear-gradient(135deg, #fffdf6, #fff4dc);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span,
.overview-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 950;
}

.category-card strong,
.overview-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.page-hero {
  padding: 58px 0 24px;
}

.page-hero > p:first-child {
  color: #f59e0b;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(40px, 6vw, 72px);
}

.page-hero-line {
  width: 86px;
  height: 5px;
  margin: 18px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-soft), var(--brand-dark));
}

.page-hero-text {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 18px;
}

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

.overview-card div {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: #9a4f05;
  font-size: 13px;
  font-weight: 800;
}

.filter-clouds,
.search-panel-section {
  padding-top: 18px;
}

.cloud-block {
  margin-top: 22px;
}

.cloud-block h3 {
  color: var(--brand-dark);
  font-size: 20px;
}

.link-cloud a,
.genre-links a {
  background: #fff;
  color: var(--brand-dark);
}

.full-ranking {
  padding: 12px;
}

.full-rank-row {
  grid-template-columns: 64px minmax(0, 1fr) minmax(220px, auto) 60px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(120px, 1fr)) auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.search-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 13px;
  outline: none;
  padding: 11px 12px;
  background: #fffaf0;
  color: var(--ink);
}

.search-panel button {
  align-self: end;
  height: 44px;
  border-radius: 13px;
}

.search-count {
  min-height: 28px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: #111827;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) scale(1.08) saturate(1.15);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  color: #fff;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 16 / 22;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: #fef3c7;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  color: #fff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
}

.detail-line {
  max-width: 780px;
  margin: 22px 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.85;
}

.detail-meta span,
.detail-tags a {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags {
  margin-top: 14px;
}

.player-section {
  margin-top: 16px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #080808;
}

.player-card video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.24), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand));
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.34);
  font-size: 30px;
  text-indent: 4px;
}

.player-overlay strong {
  font-size: 22px;
}

.player-card.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-status {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: #fff;
  font-size: 13px;
}

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

.detail-text article {
  padding: 24px;
}

.detail-text h2 {
  font-size: 28px;
}

.detail-text p {
  color: #704414;
  font-size: 17px;
  line-height: 2;
}

.genre-links {
  margin-top: 20px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(180, 83, 9, 0.16);
  background: #fff7ed;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  font-size: 22px;
}

.footer-shell p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #fff;
  font-weight: 800;
}

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

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

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

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

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

  .brand-text {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .hero-content {
    padding-right: 0;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-grid,
  .overview-grid,
  .category-panel,
  .text-grid,
  .split-layout,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .detail-shell {
    padding: 36px 0;
  }

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

  .full-rank-row,
  .ranking-row {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
  }

  .rank-meta,
  .full-rank-row em {
    display: none;
  }

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

  .footer-shell {
    display: grid;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .content-section,
  .page-hero,
  .footer-shell,
  .detail-shell,
  .hero-content,
  .quick-entry {
    width: min(100% - 24px, 1180px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .card-body p {
    display: none;
  }

  .quick-entry {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 38px;
  }
}
