:root {
  --bg: #fff8eb;
  --paper: #ffffff;
  --ink: #2f1c0b;
  --muted: #7c5c34;
  --brand: #92400e;
  --brand-dark: #78350f;
  --brand-soft: #fef3c7;
  --accent: #f59e0b;
  --accent-strong: #ea580c;
  --line: rgba(146, 64, 14, 0.16);
  --shadow: 0 24px 70px rgba(120, 53, 15, 0.15);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(180deg, #fff7e6 0%, #fffaf1 42%, #ffffff 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(120, 53, 15, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(254, 243, 199, 0.16);
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.2);
}

.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.site-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
  font-size: 18px;
}

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

.site-brand-text strong {
  color: #fff7d6;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.site-brand-text small {
  color: #fcd34d;
  font-size: 12px;
  margin-top: 4px;
}

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

.site-nav a {
  color: #fffbeb;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: #fcd34d;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 251, 235, 0.12);
  border: 1px solid rgba(254, 243, 199, 0.18);
  padding: 6px;
  border-radius: 999px;
}

.header-search input,
.hero-search input,
.search-panel input,
.inline-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--ink);
  background: #fffdf7;
}

.header-search input {
  width: 180px;
  background: rgba(255, 251, 235, 0.96);
}

.header-search button,
.hero-search button,
.search-panel button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff7ed;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.24);
}

.mobile-nav-button {
  display: none;
  margin-left: auto;
  color: #fffbeb;
  font-size: 28px;
  background: transparent;
  border: 0;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #4b2509;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 1.2s ease;
  background-image:
    linear-gradient(90deg, rgba(70, 31, 7, 0.9) 0%, rgba(120, 53, 15, 0.7) 38%, rgba(120, 53, 15, 0.24) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1240px) / 2 + 24px));
  color: #fffbeb;
}

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

.hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
  color: #fde68a;
}

.hero-summary {
  max-width: 680px;
  margin: 0;
  color: #fff7d6;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.movie-tags span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #78350f;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 800;
}

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

.primary-button,
.ghost-button,
.section-action,
.rank-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.rank-play {
  color: #fff7ed;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.28);
}

.ghost-button {
  color: #fffbeb;
  background: rgba(255, 251, 235, 0.16);
  border: 1px solid rgba(254, 243, 199, 0.28);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover,
.rank-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(120, 53, 15, 0.22);
}

.full-button {
  width: 100%;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  width: 36px;
  background: #fbbf24;
}

.hero-search {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 36px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 251, 235, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.category-ribbon {
  width: min(1240px, calc(100% - 40px));
  margin: -22px auto 20px;
  position: relative;
  z-index: 8;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.category-ribbon a {
  white-space: nowrap;
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #fef3c7;
  font-weight: 900;
}

.content-section,
.page-main,
.category-grid-section,
.movie-list-section,
.rank-list {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.detail-card p,
.category-card-body p,
.movie-card-body p,
.rank-info p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.section-action {
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid var(--line);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(120, 53, 15, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(120, 53, 15, 0.16);
}

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

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

.movie-poster img,
.category-cover::before,
.poster-panel img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-poster img {
  transition: transform 0.3s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(120, 53, 15, 0.84);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line,
.rank-meta,
.detail-genre {
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
}

.movie-card-body h2 {
  margin: 8px 0 8px;
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.28;
  font-weight: 950;
}

.compact-card .movie-card-body h2 {
  font-size: 16px;
}

.movie-card-body p {
  margin: 0;
  font-size: 14px;
}

.page-main {
  padding: 28px 0 56px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 22px 0 32px;
  padding: 48px;
  border-radius: 34px;
  color: #fff7ed;
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.94), rgba(194, 65, 12, 0.82)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.4), transparent 22rem);
  box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p,
.page-hero .section-kicker {
  color: #fffbeb;
}

.small-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search-panel,
.inline-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 720px;
  margin-top: 24px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(120, 53, 15, 0.1);
}

.category-cover {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 210px;
  padding: 22px;
  color: #fff7ed;
  background-image: linear-gradient(0deg, rgba(69, 26, 3, 0.86), rgba(69, 26, 3, 0.08)), var(--category-image);
  background-size: cover;
  background-position: center;
}

.category-cover span {
  font-size: 28px;
  font-weight: 950;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 24px;
  font-weight: 950;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #92400e;
  margin: 10px 0 16px;
  font-weight: 800;
}

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

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

.player-card,
.detail-card,
.poster-panel,
.meta-panel {
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f0a05;
  overflow: hidden;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff7ed;
  background: radial-gradient(circle, rgba(120, 53, 15, 0.2), rgba(0, 0, 0, 0.62));
  border: 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.video-frame.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #78350f;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 22px 55px rgba(245, 158, 11, 0.35);
}

.detail-card {
  padding: 32px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.year-badge {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff7ed;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 950;
}

.detail-one-line {
  padding: 18px 20px;
  border-radius: 22px;
  color: var(--brand-dark);
  background: #fffbeb;
  border: 1px solid var(--line);
  font-size: 18px;
  font-weight: 800;
}

.detail-card h2,
.meta-panel h2 {
  margin: 28px 0 12px;
  color: var(--brand-dark);
  font-size: 24px;
  font-weight: 950;
}

.poster-panel {
  padding: 18px;
}

.poster-panel img {
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  background: linear-gradient(135deg, #78350f, #f59e0b);
  margin-bottom: 16px;
}

.meta-panel {
  margin-top: 22px;
  padding: 24px;
}

.meta-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.meta-panel dt {
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
}

.meta-panel dd {
  margin: -8px 0 0;
  color: var(--ink);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 68px 86px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(120, 53, 15, 0.08);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff7ed;
  background: linear-gradient(135deg, var(--brand), var(--accent-strong));
  font-size: 18px;
  font-weight: 950;
}

.rank-thumb {
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.rank-info h2 {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 950;
}

.intro-panel {
  margin-bottom: 36px;
  padding: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border-radius: 34px;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.intro-panel h2 {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 950;
}

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

.intro-links a {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 900;
}

.site-footer {
  margin-top: 30px;
  padding: 48px 24px 24px;
  color: #fef3c7;
  background: #78350f;
}

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

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

.footer-grid h2 {
  margin: 0 0 12px;
  color: #fff7ed;
  font-size: 18px;
  font-weight: 950;
}

.footer-grid p {
  color: #fcd34d;
}

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

.footer-links a {
  color: #fde68a;
  font-weight: 800;
}

.footer-bottom {
  width: min(1240px, 100%);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(254, 243, 199, 0.18);
  color: #fbbf24;
  text-align: center;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .detail-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
  }

  .meta-panel {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .site-header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 14px 18px;
  }

  .mobile-nav-button {
    display: block;
  }

  .site-nav,
  .header-search {
    display: none;
    width: 100%;
  }

  .site-header.nav-open .site-nav,
  .site-header.nav-open .header-search {
    display: flex;
  }

  .site-nav {
    order: 3;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-search {
    order: 4;
  }

  .header-search input {
    width: 100%;
  }

  .hero-carousel {
    min-height: 720px;
  }

  .hero-content {
    margin: 0 auto;
    text-align: center;
  }

  .hero-actions,
  .hero-tags {
    justify-content: center;
  }

  .category-grid,
  .footer-grid,
  .intro-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 44px 76px 1fr;
  }

  .rank-play {
    grid-column: 2 / -1;
  }

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

@media (max-width: 560px) {
  .site-brand-text strong {
    font-size: 20px;
  }

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

  .hero-content h2 {
    font-size: 26px;
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-search,
  .search-panel,
  .inline-filter {
    grid-template-columns: 1fr;
  }

  .content-section,
  .page-main,
  .category-grid-section,
  .movie-list-section,
  .rank-list {
    width: min(100% - 24px, 1240px);
  }

  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-card,
  .intro-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .detail-title-row {
    flex-direction: column;
  }
}
