:root {
  --lava-50: #fff4ed;
  --lava-100: #ffe2d0;
  --lava-500: #f97316;
  --lava-600: #ea580c;
  --lava-700: #c2410c;
  --rose-600: #e11d48;
  --volcanic-50: #f8fafc;
  --volcanic-100: #eef2f7;
  --volcanic-200: #dfe7ef;
  --volcanic-300: #c7d2df;
  --volcanic-500: #64748b;
  --volcanic-600: #475569;
  --volcanic-700: #334155;
  --volcanic-800: #1f2937;
  --volcanic-900: #0f172a;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.1);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--volcanic-900);
  background: linear-gradient(180deg, #fff7ed 0, #ffffff 460px, #f8fafc 100%);
  line-height: 1.6;
}

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: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 64px);
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--lava-500), var(--rose-600));
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.35);
}

.brand-text {
  font-size: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.22);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

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

.section {
  padding: clamp(48px, 7vw, 86px) 0;
}

.section.alt {
  background: linear-gradient(180deg, #ffffff 0, var(--volcanic-50) 100%);
}

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

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lava-700);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.16;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 5.35rem);
  letter-spacing: -0.06em;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.08rem;
}

.text-gradient {
  color: transparent;
  background: linear-gradient(135deg, var(--volcanic-900), var(--lava-600), var(--rose-600));
  background-clip: text;
  -webkit-background-clip: text;
}

.lead {
  max-width: 760px;
  color: var(--volcanic-600);
  font-size: 1.08rem;
}

.hero {
  position: relative;
  min-height: clamp(620px, 84vh, 860px);
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 18% 35%, rgba(249, 115, 22, 0.34), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.93) 0, rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0, transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  min-height: clamp(620px, 84vh, 860px);
  padding: 92px 0 74px;
}

.hero-panel {
  max-width: 760px;
  animation: fadeUp 0.75s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 9px 14px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(16px);
}

.hero p {
  max-width: 690px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.28rem);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--lava-500), var(--rose-600));
  box-shadow: 0 18px 35px rgba(225, 29, 72, 0.32);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
}

.hero-controls {
  position: absolute;
  right: clamp(18px, 5vw, 68px);
  bottom: 68px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.rail-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-arrow:hover,
.rail-button:hover {
  background: rgba(249, 115, 22, 0.78);
  transform: scale(1.06);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 32px;
  background: var(--lava-500);
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.32);
  box-shadow: var(--shadow-card);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--volcanic-900), var(--lava-700));
}

.poster-link img,
.wide-poster img,
.detail-poster img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.25s ease;
}

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

.poster-link::after,
.wide-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after,
.wide-card:hover .wide-poster::after {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--lava-500), var(--rose-600));
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(225, 29, 72, 0.32);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play,
.wide-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--volcanic-500);
  font-size: 0.78rem;
}

.meta-line span {
  padding: 3px 8px;
  background: var(--volcanic-100);
  border-radius: 999px;
}

.movie-card h3 {
  margin-bottom: 8px;
  color: var(--volcanic-900);
  font-weight: 900;
}

.movie-card h3 a:hover,
.rank-item a:hover,
.breadcrumb a:hover {
  color: var(--lava-600);
}

.movie-card p,
.wide-card p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--volcanic-600);
  font-size: 0.93rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  padding: 4px 8px;
  color: var(--lava-700);
  background: var(--lava-50);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.rail-wrap {
  position: relative;
}

.card-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.card-rail::-webkit-scrollbar {
  display: none;
}

.card-rail .movie-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.rail-controls {
  display: flex;
  gap: 10px;
}

.rail-button {
  color: var(--volcanic-800);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.wide-card {
  display: grid;
  grid-template-columns: 164px 1fr;
  min-height: 230px;
}

.wide-poster {
  position: relative;
  overflow: hidden;
  background: var(--volcanic-900);
}

.wide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--volcanic-900), #7c2d12 58%, var(--rose-600));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.category-card::after {
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  content: "";
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.category-card p,
.category-card span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  display: inline-flex;
  margin-top: 18px;
  font-weight: 800;
}

.page-hero {
  padding: clamp(56px, 8vw, 92px) 0 36px;
}

.page-hero-card {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 5vw, 54px);
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.38), transparent 24%),
    linear-gradient(135deg, var(--volcanic-900), #111827 48%, #7c2d12);
  border-radius: 32px;
  box-shadow: var(--shadow-card);
}

.page-hero-card .lead {
  color: rgba(255, 255, 255, 0.82);
}

.search-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(130px, 0.4fr));
  gap: 12px;
  margin: 26px 0 34px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select,
.inline-filter input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  color: var(--volcanic-800);
  background: var(--volcanic-50);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  outline: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-panel input:focus,
.search-panel select:focus,
.inline-filter input:focus {
  border-color: var(--lava-500);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.inline-filter {
  max-width: 480px;
  margin: 0 0 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--lava-500), var(--rose-600));
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-info strong {
  display: block;
  margin-bottom: 4px;
}

.rank-info span {
  color: var(--volcanic-500);
  font-size: 0.9rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--volcanic-500);
  font-size: 0.95rem;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.2));
}

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

.player-button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--lava-500), var(--rose-600));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(225, 29, 72, 0.42);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.player-button:hover {
  transform: scale(1.07);
}

.detail-title {
  margin: 28px 0 16px;
}

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

.detail-meta span {
  padding: 8px 12px;
  color: var(--volcanic-700);
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  font-weight: 800;
}

.prose-card {
  padding: 26px;
  margin-bottom: 20px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.prose-card h2 {
  margin-bottom: 14px;
  font-size: 1.55rem;
}

.prose-card p {
  margin: 0;
  color: var(--volcanic-700);
}

.detail-poster {
  overflow: hidden;
  background: var(--volcanic-900);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.side-card {
  padding: 22px;
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.side-card h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.side-links {
  display: grid;
  gap: 12px;
}

.side-links a {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--volcanic-50);
  border-radius: 16px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.side-links a:hover {
  background: var(--lava-50);
  transform: translateX(3px);
}

.side-links img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  background: var(--volcanic-900);
  border-radius: 12px;
}

.side-links strong {
  display: block;
  color: var(--volcanic-900);
}

.side-links span {
  color: var(--volcanic-500);
  font-size: 0.84rem;
}

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

.site-footer {
  padding: 42px clamp(18px, 4vw, 64px);
  color: rgba(255, 255, 255, 0.78);
  background: var(--volcanic-900);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.footer-inner p {
  max-width: 640px;
  margin: 8px 0 0;
}

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

.footer-links a {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
}

.is-filtered-out {
  display: none !important;
}

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

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

  .wide-grid,
  .rank-list,
  .detail-layout,
  .page-hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: calc(100% + 10px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
  }

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

  .hero-controls {
    left: 18px;
    right: auto;
    bottom: 24px;
  }

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .wide-card {
    grid-template-columns: 128px 1fr;
    min-height: 190px;
  }

  .wide-body {
    padding: 15px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .grid,
  .grid.compact,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .btn {
    width: 100%;
  }

  .wide-card {
    grid-template-columns: 1fr;
  }

  .wide-poster {
    aspect-ratio: 16 / 10;
  }

  .rank-item {
    grid-template-columns: 52px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}

.hero-slide {
  pointer-events: none;
}

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