:root {
  --volcanic-950: #160b0a;
  --volcanic-900: #25100f;
  --volcanic-800: #3a1613;
  --volcanic-700: #5b2119;
  --volcanic-600: #8f3324;
  --lava-500: #f05a28;
  --lava-400: #ff8757;
  --ash-950: #0c0f14;
  --ash-900: #131821;
  --ash-800: #1d2430;
  --ash-700: #303847;
  --ash-600: #5b6574;
  --ash-200: #d9dee7;
  --ash-100: #eef1f6;
  --ash-50: #f7f8fb;
  --white: #ffffff;
  --shadow-soft: 0 16px 50px rgba(22, 11, 10, 0.16);
  --shadow-lava: 0 12px 28px rgba(143, 51, 36, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #f7f8fb 0%, #ffffff 48%, #f8f1ef 100%);
  color: var(--ash-900);
}

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

img,
video {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, var(--volcanic-800), var(--volcanic-950));
  box-shadow: 0 12px 35px rgba(12, 15, 20, 0.24);
}

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

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, var(--lava-400), var(--volcanic-600));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 30px rgba(255, 135, 87, 0.35);
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  color: #fff;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
  font-weight: 650;
  font-size: 14px;
}

.desktop-nav a {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--lava-400);
  opacity: 1;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 3px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-nav a {
  color: #fff;
  padding: 10px 0;
  font-weight: 650;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--ash-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(240, 90, 40, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(12, 15, 20, 0.90), rgba(12, 15, 20, 0.58), rgba(12, 15, 20, 0.26));
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffd6c8;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #eef1f6;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--lava-500), var(--volcanic-700));
  color: #fff;
  box-shadow: var(--shadow-lava);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(14px);
}

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--lava-400);
}

.section {
  padding: 64px 0;
}

.section-soft {
  background: linear-gradient(135deg, rgba(143, 51, 36, 0.08), rgba(255, 135, 87, 0.08));
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  color: var(--ash-950);
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--ash-600);
  line-height: 1.7;
}

.section-link {
  color: var(--volcanic-600);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  min-height: 100%;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 38px rgba(12, 15, 20, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 135, 87, 0.45), transparent 30%),
    linear-gradient(135deg, var(--volcanic-800), var(--ash-950));
}

.poster-frame.poster {
  aspect-ratio: 3 / 4;
}

.poster-frame.landscape {
  aspect-ratio: 16 / 9;
}

.poster-frame.thumb {
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  border-radius: 14px;
}

.poster-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-link:hover .poster-frame img,
.rank-row:hover .poster-frame img {
  transform: scale(1.06);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.poster-frame.no-image .poster-fallback {
  display: flex;
}

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

.movie-meta-line {
  gap: 6px;
  margin-bottom: 10px;
}

.movie-meta-line span {
  background: var(--ash-100);
  color: var(--ash-700);
  font-size: 12px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--ash-950);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0;
  min-height: 42px;
  color: var(--ash-600);
  font-size: 13px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(143, 51, 36, 0.09);
  color: var(--volcanic-700);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 176px;
  padding: 22px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 135, 87, 0.36), transparent 32%),
    linear-gradient(135deg, #ffffff, #fff3ef);
  box-shadow: 0 12px 38px rgba(12, 15, 20, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.category-card h3 {
  margin: 0 0 10px;
  color: var(--ash-950);
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--ash-600);
  line-height: 1.65;
  font-size: 14px;
}

.category-card strong {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: rgba(143, 51, 36, 0.16);
  font-size: 54px;
  letter-spacing: -0.08em;
}

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

.rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(12, 15, 20, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

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

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

.rank-info strong {
  color: var(--ash-950);
  font-size: 17px;
  line-height: 1.35;
}

.rank-info small {
  margin-top: 7px;
  color: var(--ash-600);
  line-height: 1.5;
}

.page-hero {
  padding: 62px 0 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 135, 87, 0.28), transparent 34%),
    linear-gradient(135deg, var(--volcanic-900), var(--ash-950));
  color: #fff;
}

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

.page-title p {
  color: #f1cfc4;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.search-box {
  width: min(100%, 620px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-panel {
  display: none;
  margin-top: 18px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.search-panel.is-visible {
  display: block;
}

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

.search-results a {
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.search-results strong,
.search-results small {
  display: block;
}

.search-results small {
  margin-top: 5px;
  color: #ffd6c8;
}

.detail-hero {
  background: #020305;
  padding: 28px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(240, 90, 40, 0.20), transparent 32%),
    rgba(0, 0, 0, 0.28);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lava-500), var(--volcanic-700));
  color: #fff;
  font-size: 34px;
  box-shadow: var(--shadow-lava);
  cursor: pointer;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
  font-size: 13px;
}

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

.panel {
  border-radius: 24px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 12px 38px rgba(12, 15, 20, 0.08);
}

.detail-title {
  margin: 0 0 14px;
  color: var(--ash-950);
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: var(--ash-700);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  background: var(--ash-100);
  color: var(--ash-700);
}

.detail-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--ash-100);
}

.detail-section h2,
.side-panel h3 {
  margin: 0 0 14px;
  color: var(--ash-950);
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--ash-700);
  line-height: 1.9;
}

.side-panel {
  position: sticky;
  top: 104px;
}

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

.info-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ash-100);
}

.info-list small {
  display: block;
  color: var(--ash-600);
  margin-bottom: 4px;
}

.info-list strong {
  color: var(--ash-950);
}

.site-footer {
  margin-top: 60px;
  padding: 50px 0;
  background: linear-gradient(90deg, var(--ash-950), var(--volcanic-900));
  color: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
}

.footer-inner p {
  max-width: 520px;
  color: #d9c4bd;
  line-height: 1.7;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

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

  .nav-toggle {
    display: block;
  }

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 560px;
  }

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

  .section {
    padding: 42px 0;
  }

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 12px;
  }

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

  .category-cards,
  .rank-list,
  .search-results {
    grid-template-columns: 1fr;
  }

  .rank-row {
    align-items: flex-start;
  }

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

  .panel {
    padding: 20px;
  }
}
