:root {
  --rose-950: #3b0712;
  --rose-900: #5f1026;
  --rose-800: #8b1538;
  --rose-700: #be1e4a;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --cream: #fff8ed;
  --paper: #ffffff;
  --ink: #26131a;
  --muted: #7d6b73;
  --line: rgba(95, 16, 38, 0.12);
  --shadow: 0 20px 50px rgba(95, 16, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.18), transparent 38rem),
    linear-gradient(180deg, #fff1e7 0%, #fffaf3 36%, #ffffff 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--rose-950), var(--rose-800), #7c2d12);
  box-shadow: 0 12px 30px rgba(71, 8, 28, 0.28);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--rose-950);
  background: linear-gradient(135deg, var(--amber-300), #fff7c2);
  box-shadow: 0 10px 22px rgba(252, 211, 77, 0.28);
  font-size: 14px;
}

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

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.86);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--amber-300);
  background: rgba(255, 255, 255, 0.08);
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 290px;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.header-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: none;
  color: #fff;
  background: transparent;
  padding: 10px 12px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.header-search button,
.mobile-search button,
.hero-actions a,
.section-more,
.play-overlay,
.filter-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  color: var(--rose-950);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.22);
}

.header-search button {
  padding: 10px 18px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  width: 44px;
  height: 44px;
  color: #fff;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 24px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: rgba(59, 7, 18, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 6px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  border-radius: 18px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search button {
  padding: 8px 14px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: #18050d;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 4, 9, 0.92) 0%, rgba(58, 8, 26, 0.72) 43%, rgba(21, 6, 13, 0.24) 100%),
    linear-gradient(0deg, rgba(24, 5, 13, 0.95) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 32px));
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 90px 0 170px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--amber-300);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(252, 211, 77, 0.35);
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 14px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 650px;
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.hero-meta,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta {
  margin: 20px 0 26px;
}

.hero-meta span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #8b1538;
  background: #fff2d6;
}

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

.hero-actions a {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
}

.hero-actions a.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.hero-thumbs {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: min(1180px, calc(100% - 32px));
}

.hero-thumb {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.hero-thumb img {
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.hero-thumb small {
  color: rgba(255, 255, 255, 0.68);
}

.hero-thumb.active {
  border-color: rgba(252, 211, 77, 0.7);
  background: rgba(245, 158, 11, 0.22);
}

.main-section {
  padding: 54px 0;
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  color: var(--rose-950);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  display: inline-flex;
  padding: 12px 18px;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(95, 16, 38, 0.2);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #38111d, #9f1239);
}

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

.movie-card:hover .card-cover img,
.compact-card:hover img {
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 58%);
}

.card-score {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 12px;
  color: var(--rose-950);
  background: var(--amber-300);
  font-weight: 900;
}

.card-play {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(190, 30, 74, 0.86);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 18px;
}

.card-tags {
  margin-bottom: 12px;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.card-body h2 a:hover {
  color: var(--rose-700);
}

.card-body p {
  min-height: 58px;
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: #9a6c29;
  font-size: 13px;
  font-weight: 800;
}

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

.category-card {
  display: grid;
  gap: 18px;
  border-radius: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(190, 30, 74, 0.35);
}

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

.category-covers img {
  height: 98px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, #421321, #be1e4a);
}

.category-card h2 {
  margin: 0 0 8px;
  color: var(--rose-950);
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(95, 16, 38, 0.1);
}

.rank-num {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--rose-950);
  background: linear-gradient(135deg, var(--amber-300), #fff4c2);
  font-weight: 900;
}

.rank-row img {
  height: 70px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #421321, #be1e4a);
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.page-title {
  padding: 54px 0 18px;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--rose-950);
  font-weight: 900;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(139, 21, 56, 0.16);
  outline: none;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

.filter-empty {
  display: none;
  margin: 18px 0 0;
  color: var(--rose-700);
  font-weight: 800;
}

.filter-empty.show {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 34px 0 64px;
}

.breadcrumb {
  padding-top: 26px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a:hover {
  color: var(--rose-700);
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 18px;
}

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

.player-status {
  display: none;
  padding: 12px 16px;
  color: #fff;
  background: var(--rose-800);
  font-weight: 800;
}

.player-status.show {
  display: block;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  color: var(--rose-950);
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.05em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #8b1538;
  font-weight: 900;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 12px;
  color: var(--rose-950);
}

.detail-card p {
  margin: 0 0 14px;
  color: #4b3740;
  line-height: 1.88;
  font-size: 17px;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin-top: 0;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 248, 237, 0.78);
  border: 1px solid rgba(139, 21, 56, 0.08);
}

.compact-card img {
  grid-row: 1 / span 2;
  height: 62px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #421321, #be1e4a);
}

.compact-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.compact-card small {
  color: var(--muted);
}

.site-footer {
  color: rgba(255, 255, 255, 0.8);
  background: linear-gradient(135deg, var(--rose-950), #19050d);
  padding: 46px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--amber-300);
  font-size: 18px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  line-height: 1.75;
}

.site-footer a:not(.site-logo) {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.76);
}

.site-footer a:hover {
  color: var(--amber-300);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-thumbs {
    grid-template-columns: repeat(5, 1fr);
    overflow-x: auto;
  }

  .hero-thumb {
    min-width: 180px;
  }

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

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

  .ranking-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .site-logo {
    font-size: 18px;
  }

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

  .hero-content {
    padding-bottom: 190px;
  }

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

  .hero-thumbs {
    grid-template-columns: none;
    grid-auto-flow: column;
    justify-content: start;
  }

  .section-head {
    display: grid;
  }

  .movie-grid,
  .category-grid,
  .filter-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 88px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    height: 60px;
  }

  .detail-card,
  .side-card {
    border-radius: 22px;
  }
}
