:root {
  --bg: #fff7ed;
  --bg-soft: #fff1f2;
  --card: #ffffff;
  --text: #431407;
  --muted: #7c2d12;
  --line: rgba(185, 28, 28, 0.14);
  --brand: #b91c1c;
  --brand-dark: #7f1d1d;
  --accent: #d97706;
  --accent-dark: #92400e;
  --shadow: 0 22px 60px rgba(127, 29, 29, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 32rem),
    linear-gradient(180deg, var(--bg), var(--bg-soft) 52%, #fff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 28px rgba(185, 28, 28, 0.28);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(127, 29, 29, 0.12);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--brand-dark);
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

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

.hero-carousel {
  position: relative;
  min-height: clamp(580px, 78vh, 820px);
  overflow: hidden;
  background: #180707;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand-dark), var(--accent-dark));
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 7, 7, 0.92), rgba(24, 7, 7, 0.45) 52%, rgba(24, 7, 7, 0.18)),
    linear-gradient(0deg, rgba(24, 7, 7, 0.92), transparent 42%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1220px) / 2));
  right: 32px;
  bottom: 112px;
  max-width: 780px;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(251, 191, 36, 0.22);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-kicker {
  color: #fef3c7;
  background: rgba(217, 119, 6, 0.36);
  border: 1px solid rgba(254, 243, 199, 0.22);
}

.eyebrow.light {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.15);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #ffedd5;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-cloud span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 800;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 36px rgba(185, 28, 28, 0.28);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

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

.section-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 28px;
}

.search-panel h2,
.section-title-row h2,
.ranking-copy h2,
.page-hero h1 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.search-form,
.filter-bar {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  color: var(--text);
  background: #fff7ed;
  padding: 0 18px;
}

.search-form button {
  min-width: 120px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-weight: 900;
  cursor: pointer;
}

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

.text-link {
  color: var(--brand);
  font-weight: 900;
}

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

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-dark), var(--accent-dark));
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  opacity: 0.72;
  transform: scale(1.06);
}

.category-card span,
.category-card em {
  position: absolute;
  left: 20px;
  right: 20px;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.category-card span {
  bottom: 52px;
  font-size: 24px;
  font-weight: 900;
}

.category-card em {
  bottom: 22px;
  color: #ffedd5;
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 45px rgba(127, 29, 29, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(127, 29, 29, 0.18);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #92400e);
}

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

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

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(185, 28, 28, 0.88);
  font-weight: 900;
  font-size: 13px;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.card-meta {
  margin-top: 7px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.card-body p {
  display: -webkit-box;
  min-height: 50px;
  margin: 10px 0 0;
  overflow: hidden;
  color: #7c2d12;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 90px 1fr;
  min-height: 126px;
}

.movie-card.compact .card-poster {
  aspect-ratio: auto;
  min-height: 126px;
}

.movie-card.compact .card-body {
  padding: 12px;
}

.movie-card.compact .card-title {
  font-size: 15px;
}

.movie-card.compact .card-body p,
.movie-card.compact .card-play {
  display: none;
}

.ranking-band {
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.3), transparent 34rem),
    linear-gradient(135deg, #7f1d1d, #991b1b 44%, #92400e);
}

.ranking-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  gap: 34px;
  align-items: center;
}

.ranking-copy h2 {
  color: #fff;
}

.ranking-copy p {
  max-width: 460px;
  color: #ffedd5;
  line-height: 1.8;
}

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

.rank-list.full {
  align-self: start;
}

.rank-item {
  display: grid;
  grid-template-columns: 52px 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
}

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

.rank-item img {
  width: 64px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #7f1d1d, #92400e);
}

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

.rank-info strong {
  color: var(--brand-dark);
  font-weight: 900;
  line-height: 1.4;
}

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

.page-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(58px, 9vw, 100px);
  border-radius: 34px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.92), rgba(146, 64, 14, 0.82)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.52), transparent 28rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  position: relative;
  margin-bottom: 28px;
  border-radius: 24px;
}

.filter-bar select {
  max-width: 180px;
}

.sticky-filter {
  position: sticky;
  top: 92px;
  z-index: 12;
}

.split-category-list {
  display: grid;
  gap: 24px;
}

.category-preview {
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.preview-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 24px;
}

.preview-head a {
  color: var(--brand);
  font-weight: 900;
}

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

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

.side-panel {
  align-self: start;
  position: sticky;
  top: 102px;
  display: grid;
  gap: 18px;
}

.side-panel h2,
.side-block h3 {
  margin: 0 0 14px;
  color: var(--brand-dark);
}

.side-block {
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.side-ranks {
  display: grid;
  gap: 10px;
}

.side-ranks .rank-item {
  grid-template-columns: 38px 52px minmax(0, 1fr);
  padding: 10px;
}

.side-ranks .rank-item img {
  width: 52px;
  height: 68px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #180707;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 7, 7, 0.92), rgba(24, 7, 7, 0.48)),
    linear-gradient(0deg, rgba(255, 247, 237, 1), transparent 24%);
}

.detail-hero-inner {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 100px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 32px;
  color: #ffedd5;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.poster-panel {
  padding: 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  object-fit: cover;
  background: linear-gradient(135deg, #7f1d1d, #92400e);
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 20px;
  color: #ffedd5;
  font-size: 19px;
  line-height: 1.8;
}

.detail-copy .btn {
  margin-top: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  margin-top: -78px;
  position: relative;
  z-index: 5;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
  align-self: start;
}

.detail-side {
  position: sticky;
  top: 102px;
}

.player-card,
.content-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  padding: 12px;
  background: #0f0505;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  font-size: 34px;
  transform: translateX(3px);
}

.play-overlay.hidden {
  display: none;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--brand-dark);
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #6b2c14;
  font-size: 16px;
  line-height: 1.9;
}

.compact-info dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.compact-info dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.compact-info dt {
  color: var(--brand);
  font-weight: 900;
}

.compact-info dd {
  margin: 0;
  color: var(--muted);
}

.prev-next-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prev-next-links a {
  padding: 18px;
  border-radius: 18px;
  color: var(--brand-dark);
  background: #fff;
  box-shadow: 0 14px 34px rgba(127, 29, 29, 0.12);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  margin-top: 54px;
  border-top: 1px solid var(--line);
  background: #fff7ed;
}

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

.footer-inner p {
  margin: 10px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--brand);
  font-weight: 900;
}

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

@media (max-width: 1100px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-shell,
  .ranking-page-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side,
  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 88px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .search-form,
  .filter-bar {
    flex-direction: column;
    border-radius: 24px;
  }

  .filter-bar select {
    max-width: none;
  }

  .section-title-row,
  .preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .mini-grid,
  .prev-next-links {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-grid {
    gap: 24px;
  }

  .poster-panel {
    max-width: 310px;
  }

  .detail-layout {
    margin-top: -34px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .section-shell,
  .page-hero,
  .detail-hero-inner,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1220px);
  }

  .section-shell {
    padding: 46px 0;
  }

  .page-hero {
    padding: 42px 22px;
    border-radius: 24px;
  }

  .movie-card.compact {
    grid-template-columns: 84px 1fr;
  }

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

  .rank-item img {
    width: 56px;
    height: 74px;
  }

  .content-card {
    padding: 20px;
  }
}
