:root {
  --bg: #fff8eb;
  --bg-soft: #fffbf0;
  --card: #ffffff;
  --text: #2d1606;
  --muted: #7c5b38;
  --line: rgba(180, 83, 9, 0.16);
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --shadow: 0 18px 50px rgba(146, 64, 14, 0.16);
  --shadow-soft: 0 12px 28px rgba(146, 64, 14, 0.10);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0%, #fffaf0 38%, #ffffff 100%);
  min-height: 100vh;
}

body, button, input {
  font-family: inherit;
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 235, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #d97706 50%, #92400e);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.34);
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, #92400e, #f97316, #b45309);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #7c2d12;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
  background: var(--brand);
  transform: translateY(-1px);
}

.global-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.global-search-form input,
.big-search input,
.filter-bar input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  min-width: 190px;
}

.global-search-form button,
.big-search button {
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 800;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-nav.is-open {
  display: flex;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.54fr);
  align-items: center;
  gap: 44px;
  padding: 92px max(32px, calc((100vw - 1240px) / 2 + 20px)) 88px;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.015);
}

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

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.48;
}

.hero-overlay {
  background:
    radial-gradient(circle at 72% 28%, rgba(251, 191, 36, 0.35), transparent 32%),
    linear-gradient(90deg, rgba(67, 20, 7, 0.96), rgba(120, 53, 15, 0.82) 46%, rgba(15, 23, 42, 0.48)),
    linear-gradient(0deg, rgba(67, 20, 7, 0.72), transparent 62%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: #d97706;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
}

.hero-content .eyebrow,
.detail-hero .eyebrow,
.page-hero .eyebrow,
.rank-panel .eyebrow {
  color: #fde68a;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  max-width: 820px;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: #ffedd5;
}

.hero-tags,
.tag-row,
.detail-meta,
.category-chips,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.category-chips a,
.footer-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 8px 12px;
  backdrop-filter: blur(10px);
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #d97706);
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.34);
  padding: 15px 24px;
}

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

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

.hero-poster {
  display: block;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
  background: rgba(255, 255, 255, 0.12);
}

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

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

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

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

.quick-search-panel,
.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 20px;
}

.quick-search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 8;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.big-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  background: #fff7ed;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px;
  margin-bottom: 18px;
}

.big-search input {
  padding: 0 16px;
  font-size: 16px;
}

.big-search button {
  padding: 14px 24px;
}

.category-chips a {
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid rgba(217, 119, 6, 0.2);
  padding: 9px 13px;
}

.category-chips a:hover,
.category-chips a.active {
  color: #ffffff;
  background: var(--brand);
}

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

.section-head h2,
.rank-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  color: #78350f;
  letter-spacing: -0.04em;
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.75;
  margin: 10px 0 0;
}

.section-more {
  color: var(--brand-dark);
  background: #ffedd5;
  padding: 12px 18px;
  white-space: nowrap;
}

.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 {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(217, 119, 6, 0.36);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #ffedd5;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 42px;
  min-height: 32px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #f97316, #b45309);
  box-shadow: 0 10px 22px rgba(146, 64, 14, 0.24);
  font-weight: 900;
  font-size: 13px;
}

.card-body {
  padding: 17px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.card-body h3 {
  color: #2d1606;
  line-height: 1.35;
  font-size: 17px;
  margin: 0 0 9px;
  min-height: 46px;
}

.card-body p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  margin: 0 0 12px;
  min-height: 46px;
}

.tag-row span {
  color: #9a3412;
  background: #fff7ed;
  padding: 6px 9px;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  background: linear-gradient(160deg, #92400e, #431407);
  color: #fff7ed;
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  color: #fff7ed;
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.rank-panel-head a {
  color: #fde68a;
  font-weight: 900;
}

.rank-lines {
  display: grid;
  gap: 10px;
}

.rank-lines.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-line {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff7ed;
}

.wide .rank-line {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: var(--brand);
  font-weight: 900;
}

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

.rank-genre {
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wide .rank-genre {
  color: #9a3412;
}

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

.category-card,
.category-tile {
  min-height: 160px;
  border-radius: 26px;
  padding: 24px;
  color: #fff7ed;
  background:
    radial-gradient(circle at top right, rgba(253, 230, 138, 0.45), transparent 42%),
    linear-gradient(135deg, #b45309, #7c2d12);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card span,
.category-tile h2 {
  display: block;
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 10px;
}

.category-card p,
.category-tile p {
  color: #ffedd5;
  line-height: 1.7;
  margin: 0;
}

.category-tile {
  display: grid;
  gap: 18px;
  align-content: space-between;
}

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

.tile-links a {
  color: #fde68a;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px max(20px, calc((100vw - 1240px) / 2 + 20px));
  color: #fff7ed;
  background:
    radial-gradient(circle at 80% 16%, rgba(251, 191, 36, 0.42), transparent 30%),
    linear-gradient(135deg, #7c2d12, #431407 70%);
}

.small-hero h1,
.category-hero h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow),
.detail-desc {
  max-width: 760px;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.85;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}

.filter-bar input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 0 16px;
  box-shadow: var(--shadow-soft);
}

.category-chips.mini {
  justify-content: flex-start;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  padding-top: 38px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
  color: #fde68a;
  font-weight: 800;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: end;
}

.detail-meta {
  margin: 22px 0 0;
}

.detail-meta span {
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  padding: 9px 12px;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

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

.player-section {
  max-width: 1240px;
  margin: -48px auto 0;
  padding: 0 20px 28px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  background: #0f172a;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, #f97316, #d97706);
  box-shadow: 0 16px 40px rgba(217, 119, 6, 0.45);
  font-size: 34px;
}

.play-overlay span:last-child {
  font-size: 18px;
  font-weight: 900;
}

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

.article-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.article-card h2 {
  color: #78350f;
  margin: 0 0 14px;
  font-size: 26px;
}

.article-card p {
  color: #4a2a10;
  line-height: 1.9;
  margin: 0;
  white-space: pre-line;
}

.search-page .movie-grid {
  margin-top: 24px;
}

.search-summary {
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  margin-top: 40px;
  color: #ffedd5;
  background: linear-gradient(180deg, #7c2d12, #431407);
  padding: 46px 20px 26px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.2fr;
  gap: 28px;
}

.footer-logo {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 12px;
}

.footer-inner p {
  max-width: 520px;
  line-height: 1.8;
  color: #fed7aa;
}

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

.footer-links a,
.footer-tags a {
  color: #fed7aa;
  font-weight: 800;
}

.footer-tags a {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 11px;
}

.copyright {
  max-width: 1240px;
  margin: 30px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #fdba74;
  text-align: center;
  font-size: 14px;
}

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

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero-slide,
  .detail-layout,
  .split-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .rank-panel {
    position: static;
  }

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

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

  .logo-text {
    font-size: 20px;
  }

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

  .hero-slide {
    padding: 66px 20px 86px;
    gap: 26px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 44px;
  }

  .hero-desc,
  .page-hero p:not(.eyebrow),
  .detail-desc {
    font-size: 16px;
  }

  .quick-search-panel {
    margin: -30px 14px 0;
    padding: 24px 16px;
  }

  .big-search,
  .filter-bar,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-tile-grid,
  .rank-lines.wide {
    grid-template-columns: 1fr;
  }

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

  .hero-actions,
  .big-search {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .page-hero,
  .detail-hero {
    padding: 58px 20px;
  }

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

  .player-shell,
  .article-card,
  .movie-card,
  .category-card,
  .category-tile {
    border-radius: 20px;
  }
}
