:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --card: #ffffff;
  --card-warm: #fff8eb;
  --text: #3b220f;
  --muted: #8a5a2b;
  --line: #f2d6aa;
  --primary: #92400e;
  --primary-dark: #451a03;
  --primary-soft: #f59e0b;
  --accent: #fb923c;
  --shadow: 0 20px 60px rgba(120, 53, 15, 0.16);
  --shadow-soft: 0 12px 36px rgba(120, 53, 15, 0.10);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #fffbeb 54%, #fff7ed 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(146, 64, 14, 0.18);
  background: rgba(255, 247, 237, 0.88);
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.10);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: #fff;
  box-shadow: 0 10px 26px rgba(180, 83, 9, 0.28);
}

.brand-text strong {
  display: block;
  color: var(--primary-dark);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 1px;
}

.brand-text em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  background: #fef3c7;
  color: #451a03;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  min-width: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(120, 53, 15, 0.08);
}

.header-search input,
.mobile-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  color: var(--text);
  background: transparent;
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-button,
.player-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.header-search button,
.mobile-search button {
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff3d1;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #7c2d12;
}

.mobile-panel {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 251, 235, 0.96);
  box-shadow: var(--shadow-soft);
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.page-main {
  min-height: 64vh;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: #fff;
  background: linear-gradient(135deg, #451a03 0%, #7c2d12 45%, #92400e 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.35) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.35) 75%);
  background-size: 64px 64px;
  background-position: 0 0, 0 32px, 32px -32px, -32px 0;
}

.hero-stage {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.7fr);
  gap: 44px;
  align-items: center;
  padding: 70px 0 120px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

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

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #fde68a;
  font-weight: 800;
  backdrop-filter: blur(16px);
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1.03;
  letter-spacing: -2px;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.hero p {
  max-width: 710px;
  margin: 22px 0 0;
  color: #ffedd5;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff7ed;
  font-weight: 700;
}

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

.primary-button,
.secondary-button,
.filter-button,
.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  transition: 0.22s ease;
}

.primary-button {
  color: #451a03;
  background: #fff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: #fef3c7;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-poster-wrap {
  position: relative;
  z-index: 2;
  min-height: 440px;
}

.hero-poster {
  position: absolute;
  inset: 0;
  border: 8px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.hero-card-float {
  position: absolute;
  left: -24px;
  bottom: -24px;
  width: min(280px, 85%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: rgba(69, 26, 3, 0.68);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.hero-card-float strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-card-float em {
  color: #fcd34d;
  font-style: normal;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 78px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

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

.overlap-section {
  position: relative;
  z-index: 4;
  margin-top: -70px;
}

.section,
.catalog-section,
.detail-section {
  width: min(1200px, calc(100% - 32px));
  margin: 72px auto 0;
}

.overlap-section .section {
  margin-top: 0;
}

.section-head,
.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-title,
.catalog-title {
  margin: 0;
  color: var(--primary-dark);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -1px;
}

.section-desc,
.catalog-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.text-link {
  color: var(--primary);
  font-weight: 800;
}

.text-link:hover {
  color: var(--primary-dark);
}

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

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

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

.movie-card-horizontal .poster-link {
  aspect-ratio: auto;
  min-height: 252px;
}

.movie-card-large .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.34s ease;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(69, 26, 3, 0.72);
  backdrop-filter: blur(10px);
}

.type-badge {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.play-bubble {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #451a03;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.card-kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.card-content h3 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 19px;
  line-height: 1.35;
}

.card-content h3 a:hover {
  color: var(--primary);
}

.card-content p {
  margin: 10px 0 14px;
  color: #6f4a24;
  line-height: 1.7;
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.card-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #78350f, #f59e0b);
  box-shadow: var(--shadow-soft);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -40px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 24px;
}

.category-tile span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: #ffedd5;
  line-height: 1.7;
}

.catalog-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  color: #fff;
  background: linear-gradient(135deg, #451a03, #92400e 58%, #f59e0b);
}

.catalog-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: radial-gradient(circle at 16% 18%, #fff 0 2px, transparent 2px 100%);
  background-size: 32px 32px;
}

.catalog-hero-inner,
.detail-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

.catalog-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: -1px;
}

.catalog-hero p,
.detail-copy p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
}

.filter-button {
  min-height: 40px;
  padding: 10px 15px;
  color: #7c2d12;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(120, 53, 15, 0.08);
}

.filter-button:hover,
.filter-button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 74px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(120, 53, 15, 0.06);
  transition: 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(217, 119, 6, 0.36);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f59e0b);
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.rank-info strong {
  display: block;
  color: var(--primary-dark);
  font-size: 18px;
}

.rank-info em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
}

.rank-views {
  color: #92400e;
  font-weight: 900;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.20);
  border-radius: 32px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.30);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff7ed;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.video-card {
  overflow: hidden;
  border-radius: 30px;
  background: #0c0a09;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 158px;
  color: #451a03;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.player-button:hover {
  background: #fef3c7;
}

.video-wrap.is-playing .player-button {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  min-height: 24px;
  padding: 14px 18px 18px;
  color: #ffedd5;
  background: #0c0a09;
}

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

.story-card,
.side-card {
  padding: 26px;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.story-card + .story-card {
  margin-top: 20px;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--primary-dark);
  font-size: 26px;
}

.story-card p,
.side-card p {
  margin: 0;
  color: #6f4a24;
  line-height: 1.9;
  font-size: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 68px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.side-link strong {
  display: block;
  color: var(--primary-dark);
}

.side-link span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 84px;
  padding: 42px 0;
  color: #ffedd5;
  background: linear-gradient(135deg, #451a03, #78350f);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-logo {
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 800;
}

.footer-links a:hover {
  color: #fcd34d;
}

.footer-inner p {
  width: 100%;
  margin: 0;
  color: #fed7aa;
}

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

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

  .hero-stage,
  .hero-slide {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-poster-wrap {
    min-height: 360px;
  }

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

  .category-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 68px;
  }

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

  .hero {
    min-height: 820px;
  }

  .hero-stage,
  .hero-slide {
    min-height: 820px;
  }

  .hero-slide {
    padding: 40px 0 110px;
  }

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

  .hero p {
    font-size: 17px;
  }

  .hero-dots {
    bottom: 50px;
  }

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

  .movie-card-horizontal {
    display: flex;
  }

  .movie-card-horizontal .poster-link {
    aspect-ratio: 3 / 4;
    min-height: 0;
  }

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

  .category-tiles {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

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

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

  .rank-views {
    display: none;
  }
}

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

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
