:root {
  --bg: #fffaf0;
  --bg-soft: #fffbeb;
  --paper: #ffffff;
  --paper-warm: #fff7ed;
  --text: #3f2207;
  --muted: #9a5b17;
  --muted-2: #b7791f;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fcd34d;
  --line: rgba(146, 64, 14, 0.16);
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.16);
  --radius-xl: 28px;
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.3);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

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

.nav-link {
  color: #7c3d0b;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-panel input,
.filter-input,
.filter-select,
.search-hero input {
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  width: 180px;
  padding: 9px 14px;
}

.header-search button,
.mobile-panel button,
.search-hero button,
.play-toggle,
.hero-button,
.section-more,
.text-link,
.load-more-link {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button {
  padding: 9px 14px;
  font-weight: 800;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-input:focus,
.filter-select:focus,
.search-hero input:focus {
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18);
}

.header-search button:hover,
.mobile-panel button:hover,
.search-hero button:hover,
.play-toggle:hover,
.hero-button:hover,
.section-more:hover,
.text-link:hover,
.load-more-link:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.33);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--brand-dark);
  background: #ffffff;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 20px 18px;
}

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

.mobile-panel form {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
}

.mobile-panel button {
  padding: 10px 16px;
  font-weight: 800;
}

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.66);
  font-weight: 800;
}

.main-shell,
.section-shell,
.footer-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  background: radial-gradient(circle at 20% 12%, rgba(251, 191, 36, 0.38), transparent 34%), linear-gradient(135deg, #7c2d12, #b45309 45%, #f59e0b);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -28% -10%;
  height: 280px;
  background: linear-gradient(180deg, transparent, rgba(255, 250, 240, 0.92) 58%, #fffaf0);
  pointer-events: none;
}

.hero-slider {
  position: relative;
  max-width: var(--max);
  min-height: 610px;
  margin: 0 auto;
  padding: 44px 20px 76px;
}

.hero-slide {
  position: absolute;
  inset: 44px 20px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: 44px;
  opacity: 0;
  transform: translateX(22px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  color: #fff8e1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  color: #78350f;
  background: rgba(254, 243, 199, 0.9);
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  color: #ffffff;
  text-shadow: 0 18px 44px rgba(69, 26, 3, 0.32);
}

.hero h2 {
  font-size: clamp(34px, 6vw, 64px);
}

.hero-copy p {
  max-width: 690px;
  margin: 0 0 26px;
  color: #ffedd5;
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-button,
.load-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  font-weight: 900;
}

.hero-button.secondary {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(69, 26, 3, 0.38);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(69, 26, 3, 0.72));
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  padding: 8px 12px;
  color: #7c2d12;
  background: #fef3c7;
  border-radius: 999px;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 20px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  background: #ffffff;
}

.quick-cats {
  position: relative;
  z-index: 3;
  margin-top: -56px;
}

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

.quick-card,
.category-card {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #111827;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.quick-card img,
.category-card img {
  height: 100%;
  min-height: 154px;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.02);
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.quick-card:hover img,
.category-card:hover img {
  opacity: 0.88;
  transform: scale(1.1);
}

.quick-card::after,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(69, 26, 3, 0.86));
}

.quick-card div,
.category-card div {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
  color: #ffffff;
}

.quick-card h3,
.category-card h2,
.category-card h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 900;
}

.quick-card p,
.category-card p {
  margin: 0;
  color: #ffedd5;
  font-weight: 700;
  font-size: 14px;
}

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

.content-section.soft {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(254, 243, 199, 0.62));
}

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

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.section-more,
.text-link {
  display: inline-flex;
  padding: 10px 18px;
  font-weight: 900;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(146, 64, 14, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(146, 64, 14, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #451a03;
}

.card-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-cover strong {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #78350f;
  background: #fef3c7;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(69, 26, 3, 0.18);
}

.card-body {
  padding: 14px;
}

.card-tags,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span,
.meta-pills span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: var(--brand-dark);
  background: #fef3c7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 10px 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--brand);
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
}

.movie-card-horizontal .card-cover img {
  height: 100%;
  min-height: 180px;
}

.movie-card-horizontal .card-body {
  padding: 18px;
}

.movie-card-horizontal .text-link {
  margin-top: 12px;
  padding: 8px 14px;
  font-size: 13px;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

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

.rank-panel {
  padding: 18px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.rank-mini {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(146, 64, 14, 0.1);
}

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

.rank-mini span {
  color: var(--brand);
  font-size: 18px;
  font-weight: 950;
}

.rank-mini img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-mini strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-mini em {
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 950;
}

.page-hero {
  padding: 64px 0;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.5), transparent 35%), linear-gradient(135deg, #fff7ed, #fde68a);
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: center;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 650;
}

.page-hero img {
  border-radius: var(--radius-xl);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 12px 15px;
}

.category-summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

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

.player-card,
.detail-card,
.text-card,
.related-card,
.search-card {
  border: 1px solid rgba(146, 64, 14, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.play-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translate(-50%, -50%);
  font-size: 30px;
  z-index: 3;
}

.play-toggle:hover {
  transform: translate(-50%, -52%);
}

.player-frame.playing .play-toggle {
  opacity: 0;
  pointer-events: none;
}

.player-info {
  padding: 20px;
}

.player-info h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.player-info p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.detail-card {
  overflow: hidden;
}

.detail-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-side-body {
  padding: 18px;
}

.detail-side-body h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-stats {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

.text-card {
  margin-top: 22px;
  padding: 24px;
}

.text-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.text-card p {
  margin: 0;
  color: #6d3b0d;
  font-size: 17px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

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

.rank-table {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 66px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(146, 64, 14, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.12);
}

.rank-number {
  color: var(--brand);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-row img {
  width: 86px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 21px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  min-width: 78px;
  color: var(--brand-dark);
  font-size: 24px;
  font-weight: 950;
  text-align: right;
}

.search-hero {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.search-hero form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.search-hero input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.search-hero button {
  padding: 14px 24px;
  font-weight: 900;
}

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

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: #fffbeb;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: var(--brand-dark);
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  margin: 12px 0 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

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

.footer-links a {
  color: var(--muted);
  font-weight: 750;
}

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

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

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

  .feature-grid,
  .detail-layout,
  .page-hero-inner {
    grid-template-columns: 1fr;
  }

  .page-hero img {
    max-width: 260px;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    min-height: 66px;
  }

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

  .hero,
  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    inset: 30px 20px 70px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
  }

  .hero-poster {
    width: min(260px, 82vw);
    justify-self: center;
  }

  .quick-grid,
  .category-grid,
  .horizontal-grid,
  .footer-shell,
  .filter-bar,
  .search-hero form {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card-horizontal {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .movie-card-horizontal .card-cover img {
    min-height: 168px;
  }

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

  .rank-row img {
    width: 64px;
    height: 88px;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
    font-size: 18px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .movie-grid.large,
  .search-results {
    grid-template-columns: 1fr;
  }
}
