:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fff1e6;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --accent: #f59e0b;
  --shadow: 0 18px 45px rgba(127, 29, 29, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 237, 213, 0.95), transparent 36rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 35%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(254, 215, 170, 0.8);
  background: rgba(255, 247, 237, 0.88);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
}

.logo-text {
  font-size: 1.18rem;
  white-space: nowrap;
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #7f1d1d;
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--primary);
  background: #ffedd5;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(251, 146, 60, 0.12);
}

.header-search input,
.hero-search input,
.filter-toolbar input,
.filter-toolbar select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.header-search button,
.hero-search button,
.btn-primary,
.btn-secondary,
.section-more,
.filter-toolbar select,
.prev-next a {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.hero-search button,
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

.header-search button {
  flex: 0 0 auto;
  padding: 8px 14px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.btn-secondary,
.section-more,
.prev-next a {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(254, 215, 170, 0.9);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover,
.prev-next a:hover,
.header-search button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--primary-dark);
}

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

.hero-slider,
.hero-slide,
.hero-backdrop,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-backdrop,
.detail-bg,
.category-hero-bg {
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(64, 18, 18, 0.94) 0%, rgba(96, 28, 28, 0.78) 42%, rgba(15, 23, 42, 0.28) 100%),
    radial-gradient(circle at 25% 30%, rgba(245, 158, 11, 0.38), transparent 22rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 56px 0 118px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero-line,
.detail-line {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #7f1d1d;
  background: rgba(255, 237, 213, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.hero-poster,
.detail-poster {
  display: block;
  transform: rotate(2deg);
}

.hero-poster .cover-frame,
.detail-poster .cover-frame {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.42);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 0;
  color: #7f1d1d;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  opacity: 0.6;
  transition: width 0.2s ease, opacity 0.2s ease;
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 4;
  width: min(720px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 237, 213, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.hero-search input {
  padding: 0 18px;
}

.hero-search button {
  flex: 0 0 auto;
  padding: 12px 24px;
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.section-soft {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.72), rgba(255, 255, 255, 0.92));
}

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

.section-heading h2,
.detail-article h2,
.detail-side h2,
.prose-section h2 {
  margin: 0;
  color: #7f1d1d;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p:not(.section-kicker) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  padding: 12px 18px;
}

.movie-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

.movie-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.movie-grid-featured {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.all-movie-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
  background: #ffffff;
  border: 1px solid rgba(254, 215, 170, 0.9);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #f59e0b);
}

.cover-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4.25;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.65), transparent 12rem),
    linear-gradient(135deg, #7f1d1d, #f97316 52%, #facc15);
}

.cover-frame::after {
  content: attr(data-title);
  position: absolute;
  inset: auto 16px 16px;
  z-index: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.cover-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .cover-frame img,
.category-card:hover .category-bg,
.rank-row:hover .cover-frame img {
  transform: scale(1.07);
}

.movie-badge,
.play-float {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.82);
  backdrop-filter: blur(12px);
}

.movie-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 900;
}

.play-float {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.22);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0;
  color: #7f1d1d;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--primary);
}

.movie-meta,
.movie-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.movie-desc {
  color: #4b5563;
}

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  border-radius: var(--radius);
  color: #ffffff;
  box-shadow: var(--shadow);
  isolation: isolate;
}

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

.category-bg {
  z-index: -2;
  background-size: cover;
  background-position: center;
  transition: transform 0.45s ease;
}

.category-overlay {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(30, 12, 12, 0.08), rgba(58, 15, 15, 0.88)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.45), transparent 14rem);
}

.category-card strong {
  font-size: 1.8rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-card em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  line-height: 1.7;
}

.category-enter {
  margin-top: 18px;
  font-weight: 900;
  color: #fbbf24;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(254, 215, 170, 0.85);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.08);
}

.rank-no {
  color: #ef4444;
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.rank-row .cover-frame {
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.rank-row .cover-frame::after {
  display: none;
}

.rank-main {
  min-width: 0;
}

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

.rank-main strong {
  color: #7f1d1d;
  font-size: 1.05rem;
  font-weight: 950;
}

.rank-main em,
.rank-meta {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #451a1a;
}

.compact-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  padding: 72px max(16px, calc((100% - 1180px) / 2));
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.48), transparent 18rem),
    linear-gradient(135deg, #7f1d1d, #f97316);
}

.compact-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

.category-hero {
  min-height: 360px;
}

.category-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.36;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.page-hero-content p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-toolbar input,
.filter-toolbar select {
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(254, 215, 170, 0.95);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(127, 29, 29, 0.07);
}

.detail-hero {
  min-height: 560px;
}

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

.detail-bg {
  opacity: 0.4;
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(69, 10, 10, 0.92), rgba(127, 29, 29, 0.72), rgba(15, 23, 42, 0.32)),
    radial-gradient(circle at 22% 28%, rgba(245, 158, 11, 0.38), transparent 18rem);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 54px;
  padding: 72px 0;
}

.detail-info h1 {
  max-width: 820px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 30px;
}

.detail-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.player-section {
  padding-top: 42px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at center, rgba(251, 191, 36, 0.18), transparent 18rem),
    #111827;
  box-shadow: 0 30px 80px rgba(31, 41, 55, 0.35);
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.46));
  cursor: pointer;
}

.player-button span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 24px 50px rgba(220, 38, 38, 0.35);
  font-size: 2.4rem;
  text-indent: 6px;
}

.player-box.is-playing .player-button {
  display: none;
}

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

.detail-article,
.detail-side,
.prose-section {
  padding: 28px;
  border: 1px solid rgba(254, 215, 170, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.detail-article p,
.prose-section p {
  color: #4b5563;
  font-size: 1.02rem;
  line-height: 2;
}

.detail-article h2 + p,
.prose-section h2 + p {
  margin-top: 12px;
}

.detail-article h2:not(:first-child),
.prose-section h2:not(:first-child) {
  margin-top: 28px;
}

.detail-side dl {
  margin: 18px 0 0;
}

.detail-side dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.detail-side dd {
  margin: 4px 0 0;
  color: #7f1d1d;
  font-weight: 800;
  line-height: 1.55;
}

.prev-next {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.prev-next a {
  flex: 1;
  padding: 12px;
  text-align: center;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(254, 215, 170, 0.9);
  background: #fff7ed;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.footer-inner p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #7f1d1d;
  background: #ffffff;
  font-weight: 800;
}

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

@media (max-width: 900px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

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

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

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

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    order: 5;
  }

  .main-nav a {
    background: #ffffff;
  }

  .header-search {
    order: 6;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 40px;
    padding-bottom: 170px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    transform: none;
  }

  .hero-search {
    bottom: 88px;
    border-radius: 24px;
  }

  .hero-controls {
    bottom: 28px;
  }

  .section-heading,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .filter-toolbar,
  .detail-body,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(260px, 72vw);
    transform: none;
  }

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

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

@media (max-width: 560px) {
  .content-section {
    padding: 52px 0;
  }

  .hero-search {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search input,
  .hero-search button {
    min-height: 46px;
  }

  .movie-grid,
  .movie-grid-featured,
  .all-movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    gap: 10px;
    padding: 10px;
  }

  .player-button span {
    width: 72px;
    height: 72px;
    font-size: 2rem;
  }
}
