:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #182033;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --rose: #fb7185;
  --rose-deep: #e11d48;
  --orange: #fb923c;
  --amber: #f59e0b;
  --green: #22c55e;
  --blue: #60a5fa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(244, 63, 94, 0.22), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(251, 146, 60, 0.18), transparent 30%),
    linear-gradient(180deg, #0b1020 0%, #111827 44%, #0f172a 100%);
}

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: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 76%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(20px);
}

.nav-shell,
.mobile-nav,
.footer-shell,
.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.28);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-size: 20px;
  background: linear-gradient(90deg, #fb7185, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text em {
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--dim);
}

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

.nav-link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fb7185;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-nav .nav-link {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-cat-row a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.page-shell {
  padding: 34px 0 64px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.36) 72%, rgba(15, 23, 42, 0.74) 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 108px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) 360px;
  align-items: center;
  gap: 42px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: #fecdd3;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--orange));
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 60px rgba(0, 0, 0, 0.48);
}

.gradient-text {
  background: linear-gradient(90deg, #fff, #fecdd3 42%, #fed7aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--rose-deep), var(--orange));
  box-shadow: 0 18px 42px rgba(225, 29, 72, 0.34);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-card-content {
  padding: 18px;
}

.hero-card-content strong {
  display: block;
  font-size: 19px;
}

.hero-card-content p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hero-dots button {
  width: 36px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.active {
  background: linear-gradient(90deg, var(--rose), var(--orange));
}

.quick-search {
  margin-top: -48px;
  position: relative;
  z-index: 8;
}

.search-panel,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 16px;
}

.filter-panel {
  grid-template-columns: 1fr 180px 180px;
  margin-bottom: 28px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stat-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.065);
}

.stat-card strong {
  display: block;
  font-size: 30px;
  color: #fff;
}

.stat-card span {
  color: var(--dim);
}

.content-section {
  margin-top: 54px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: none;
  color: #fecdd3;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 113, 133, 0.42);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.78));
}

.play-dot {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 12px 26px rgba(225, 29, 72, 0.28);
}

.card-year {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body p {
  min-height: 42px;
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.55;
  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,
.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.12);
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(251, 113, 133, 0.16), rgba(251, 146, 60, 0.08)),
    rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 113, 133, 0.48);
}

.category-tile strong {
  display: block;
  font-size: 22px;
}

.category-tile p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-tile span {
  display: inline-flex;
  margin-top: 18px;
  color: #fed7aa;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.rank-no {
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  color: #fed7aa;
}

.rank-row img {
  width: 88px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info strong {
  display: block;
  font-size: 18px;
}

.rank-info p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.36);
  cursor: pointer;
  z-index: 2;
}

.player-cover.hidden {
  display: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
}

.player-cover span {
  position: relative;
  z-index: 3;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 20px 60px rgba(225, 29, 72, 0.42);
}

.detail-panel {
  margin-top: 20px;
  padding: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--dim);
  font-size: 14px;
}

.breadcrumb a {
  color: #fecdd3;
}

.detail-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.08;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-summary,
.detail-review {
  margin-top: 24px;
}

.detail-summary h2,
.detail-review h2,
.side-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-summary p,
.detail-review p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.side-panel {
  padding: 18px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: rgba(251, 113, 133, 0.12);
  transform: translateX(2px);
}

.mini-card img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card strong {
  display: block;
  font-size: 14px;
}

.mini-card em {
  display: block;
  margin-top: 6px;
  color: var(--dim);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

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

.alpha-links a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  padding: 34px 0;
  color: var(--muted);
}

.footer-shell strong {
  color: #fff;
  font-size: 20px;
}

.footer-shell p {
  margin: 8px 0 0;
  line-height: 1.7;
}

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

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

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .hero-card {
    max-width: 330px;
  }
}

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

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    padding-top: 82px;
    padding-bottom: 86px;
  }

  .search-panel,
  .filter-panel,
  .stat-strip,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 76px 1fr;
  }

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

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

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

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

  .logo-text strong {
    font-size: 17px;
  }

  .logo-text em {
    display: none;
  }

  .hero-card {
    display: none;
  }

  .movie-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .detail-panel {
    padding: 18px;
  }
}
