:root {
  --bg: #fff7ed;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(245, 158, 11, 0.22);
  --amber: #f59e0b;
  --orange: #ea580c;
  --dark: #431407;
  --soft: #fffbeb;
  --shadow: 0 22px 55px rgba(120, 53, 15, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 34%, #fff7ed 100%);
  min-height: 100vh;
}

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

button,
input,
select {
  font: inherit;
}

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

.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(20px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--dark);
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}

.site-nav a,
.mobile-nav a {
  color: #78350f;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-nav a:hover {
  background: #fef3c7;
  color: #9a3412;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.header-search button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.22);
}

.mobile-menu-button {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #78350f;
  background: #fef3c7;
  cursor: pointer;
  font-weight: 900;
}

.mobile-nav {
  display: none;
  padding: 0 22px 16px;
  border-top: 1px solid var(--line);
  background: #fffbeb;
}

.section-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 18%, rgba(251, 191, 36, 0.45), transparent 28%),
    linear-gradient(135deg, #451a03 0%, #92400e 42%, #f59e0b 100%);
  color: #fff;
  min-height: 650px;
  padding: 48px 22px 72px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.24;
}

.hero-slide {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 520px;
  display: none;
  align-items: center;
  gap: 48px;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.65s ease both;
}

.hero-copy {
  max-width: 680px;
}

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

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 22px 48px rgba(0, 0, 0, 0.3);
}

.hero-copy p {
  margin: 22px 0 0;
  font-size: 19px;
  line-height: 1.9;
  color: #ffedd5;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
  background: #fef3c7;
}

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

.hero-actions.single {
  justify-content: center;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  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 {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 36px rgba(234, 88, 12, 0.33);
}

.ghost-button {
  color: #fffbeb;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.text-link {
  color: #fde68a;
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-image {
  position: relative;
  min-height: 470px;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.32);
  transform: rotate(2deg);
}

.hero-image img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-image:hover img {
  transform: scale(1.04);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.72));
}

.hero-image span {
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 22px;
  border-radius: 999px;
  padding: 9px 14px;
  color: #fff;
  font-weight: 900;
  background: rgba(245, 158, 11, 0.92);
}

.hero-controls {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: -18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-controls button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
  width: 30px;
  background: #fcd34d;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.centered {
  text-align: center;
}

.section-heading.with-link {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: #b45309;
  font-weight: 900;
}

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

.category-card,
.category-overview-card a {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 178px;
  border-radius: 26px;
  padding: 22px;
  color: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.category-overview-card a:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 28px 70px rgba(120, 53, 15, 0.22);
}

.category-card span,
.category-overview-card span {
  font-size: 15px;
  font-weight: 900;
}

.category-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.category-card em,
.category-overview-card p {
  font-style: normal;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.color-amber { background: linear-gradient(135deg, #f59e0b, #b45309); }
.color-rose { background: linear-gradient(135deg, #fb7185, #be123c); }
.color-violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.color-red { background: linear-gradient(135deg, #ef4444, #991b1b); }
.color-cyan { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.color-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.color-emerald { background: linear-gradient(135deg, #10b981, #047857); }
.color-lime { background: linear-gradient(135deg, #84cc16, #4d7c0f); }
.color-orange { background: linear-gradient(135deg, #fb923c, #c2410c); }
.color-fuchsia { background: linear-gradient(135deg, #d946ef, #a21caf); }

.two-column-section,
.editor-grid,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 28px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 70px rgba(120, 53, 15, 0.22);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.type-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(245, 158, 11, 0.92);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: #b45309;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card-body p {
  min-height: 60px;
  margin: 12px 0 0;
  color: #4b5563;
  line-height: 1.72;
  font-size: 14px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(120, 53, 15, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
  transform: translateX(5px);
  background: #fffbeb;
}

.mini-card img {
  width: 86px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.mini-card strong,
.mini-card em {
  display: block;
}

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

.mini-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.1);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  background: #fffbeb;
}

.rank-num {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  color: #78350f;
  background: #fef3c7;
}

.rank-row.top .rank-num {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

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

.rank-main strong,
.rank-main em {
  display: block;
}

.rank-main em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-heat {
  color: #b45309;
  font-weight: 900;
  white-space: nowrap;
}

.cta-section,
.page-hero {
  text-align: center;
  border-radius: 32px;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  box-shadow: var(--shadow);
}

.cta-section h2,
.cta-section p {
  margin-left: auto;
  margin-right: auto;
}

.cta-section p,
.page-hero span {
  display: block;
  max-width: 780px;
  margin: 16px auto 0;
  color: #6b4216;
  line-height: 1.8;
}

.page-hero {
  max-width: 1240px;
  margin: 34px auto 0;
  padding: 62px 22px;
  color: #111827;
}

.category-page-hero,
.ranking-hero,
.search-hero {
  color: #fff;
}

.category-page-hero h1,
.ranking-hero h1,
.search-hero h1,
.category-page-hero span,
.ranking-hero span,
.search-hero span {
  color: #fff;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.category-preview img {
  width: 100%;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.22);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
}

.empty-state {
  display: none;
  margin: 30px 0;
  padding: 34px;
  text-align: center;
  border-radius: 24px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 900;
}

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

[data-card].is-hidden {
  display: none;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.68));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-overlay button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  cursor: pointer;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 22px 46px rgba(234, 88, 12, 0.45);
}

.play-overlay span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.detail-content,
.side-poster,
.side-list {
  margin-top: 22px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-content {
  padding: 30px;
}

.detail-content h1 {
  margin-bottom: 14px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 800;
}

.lead-text {
  font-size: 18px;
  color: #374151;
  line-height: 1.9;
}

.detail-content h2 {
  margin: 26px 0 10px;
  color: #111827;
}

.detail-content p {
  line-height: 1.95;
  color: #4b5563;
}

.detail-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.detail-pager a {
  flex: 1 1 240px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 900;
}

.side-poster,
.side-list {
  padding: 18px;
}

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

.side-poster strong,
.side-poster span {
  display: block;
  margin-top: 12px;
}

.side-poster strong {
  font-size: 22px;
}

.side-poster span {
  color: #b45309;
  font-weight: 900;
}

.side-list h2 {
  margin: 0 0 16px;
}

.site-footer {
  margin-top: 54px;
  color: #fde68a;
  background: linear-gradient(180deg, #78350f, #431407);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-inner h3 {
  margin: 0 0 12px;
  color: #fffbeb;
}

.footer-inner p,
.footer-inner a {
  display: block;
  margin: 8px 0;
  color: #fed7aa;
  line-height: 1.7;
}

.footer-bottom {
  padding: 18px 22px;
  text-align: center;
  color: #fcd34d;
  border-top: 1px solid rgba(252, 211, 77, 0.18);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-slide,
  .two-column-section,
  .editor-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .section-wrap {
    padding: 40px 16px;
  }

  .hero-carousel {
    min-height: auto;
    padding: 34px 16px 54px;
  }

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

  .hero-image,
  .hero-image img {
    min-height: 360px;
  }

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

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

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

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

  .rank-heat {
    grid-column: 3;
  }

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

@media (max-width: 460px) {
  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .category-movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .section-heading.with-link {
    align-items: stretch;
    flex-direction: column;
  }
}
