:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c32;
  --card: rgba(30, 41, 59, 0.78);
  --card-strong: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #f59e0b;
  --accent-strong: #f97316;
  --blue: #38bdf8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.14), transparent 28rem),
    linear-gradient(180deg, #111827 0%, var(--bg) 42%, #020617 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
  z-index: -1;
}

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;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(var(--max), calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #fcd34d);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  transition: 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  width: min(1320px, calc(100% - 32px));
  margin: 26px auto 0;
}

.hero-stage {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 36px;
  align-items: center;
  padding: clamp(28px, 5vw, 76px);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.8s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-backdrop,
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.14);
  transform: scale(1.08);
  opacity: 0.34;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.45) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98) 0%, transparent 40%);
}

.hero-content,
.hero-poster,
.page-hero-content,
.detail-content {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.rank-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.68);
  font-size: 0.82rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #fcd34d);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.26);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.48);
}

.btn-mini {
  min-height: 38px;
  padding: 0 14px;
  color: #111827;
  background: #fbbf24;
}

.hero-poster {
  width: min(360px, 90%);
  justify-self: center;
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.03);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.hero-thumbs {
  position: absolute;
  left: clamp(20px, 5vw, 74px);
  right: clamp(20px, 5vw, 74px);
  bottom: 26px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  color: var(--text);
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(245, 158, 11, 0.14);
}

.hero-thumb img {
  width: 42px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
}

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

.hero-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(12px);
}

.hero-quick span,
.category-overview-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-quick strong {
  display: block;
  margin-top: 4px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.quick-links a,
.section-more {
  padding: 9px 13px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.section-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 72px auto 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  letter-spacing: -0.04em;
}

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

.featured-grid {
  margin-top: 22px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.rank-row:hover .rank-cover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent 48%);
}

.heat-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 0.8rem;
  font-weight: 900;
}

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

.movie-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card p {
  min-height: 3.9em;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.65;
}

.movie-card.compact h3 {
  font-size: 0.98rem;
}

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

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 5px 8px;
  font-size: 0.76rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  background: rgba(30, 41, 59, 0.86);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #111827;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transition: transform 0.3s ease;
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.1));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 1.2rem;
}

.category-tile em {
  margin-top: 6px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 0.88rem;
}

.rank-section {
  margin-bottom: 80px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.62);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.38);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
}

.rank-cover img {
  width: 78px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.rank-info p {
  margin: 0 0 8px;
  color: #cbd5e1;
  line-height: 1.55;
}

.rank-play {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid var(--line);
}

.full-rank-list {
  margin-top: 22px;
}

.page-hero,
.detail-hero {
  position: relative;
  width: min(1320px, calc(100% - 32px));
  margin: 26px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.slim-hero {
  padding: clamp(34px, 7vw, 76px);
}

.slim-hero p {
  max-width: 760px;
}

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

.category-hero::after,
.detail-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.44));
}

.page-hero-content {
  padding: clamp(32px, 6vw, 72px);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.64);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-card h2 {
  margin: 8px 0;
}

.category-overview-card p {
  color: #cbd5e1;
  line-height: 1.7;
}

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

.detail-hero::after {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.44)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98), transparent 48%);
}

.detail-content {
  padding: clamp(24px, 5vw, 70px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #fcd34d;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 58px);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.detail-meta {
  margin-top: 18px;
}

.detail-tags {
  margin-top: 18px;
}

.player-wrap {
  margin-top: 36px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.74));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
  width: clamp(68px, 9vw, 98px);
  height: clamp(68px, 9vw, 98px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #fcd34d);
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.34);
  font-size: 2rem;
  transform: translateX(3px);
}

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

.detail-body-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.detail-main-text {
  display: grid;
  gap: 18px;
}

.detail-text-card,
.detail-side-card {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.64);
}

.detail-text-card h2,
.detail-side-card h2 {
  margin: 0 0 14px;
}

.detail-text-card p {
  margin: 0;
  color: #dbeafe;
  font-size: 1.02rem;
  line-height: 1.9;
}

.detail-side-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-side-card dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-side-card dd {
  margin: -8px 0 0;
  color: var(--text);
  line-height: 1.6;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.5);
}

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

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

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

.footer-links a:hover {
  color: #fcd34d;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero-stage {
    min-height: 720px;
  }

  .hero-slide {
    align-content: center;
    padding-bottom: 180px;
  }

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

  .hero-quick,
  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-links {
    justify-content: flex-start;
  }

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

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

  .category-overview-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 300px;
  }

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

  .rank-play {
    grid-column: 3;
    width: fit-content;
  }
}

@media (max-width: 540px) {
  .hero,
  .page-hero,
  .detail-hero,
  .section-wrap {
    width: min(100% - 20px, var(--max));
  }

  .hero-stage {
    min-height: 680px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 28px 22px 168px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.35rem;
  }

  .hero-thumb span {
    display: none;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-cover {
    display: none;
  }

  .rank-info p {
    display: none;
  }
}
