:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(56, 189, 248, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.28), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.20), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(59, 130, 246, 0.20);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(18px);
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 26px rgba(34, 211, 238, 0.24);
  transition: transform 0.28s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-3deg);
}

.logo-text {
  background: linear-gradient(90deg, #60a5fa, #67e8f9, #38bdf8);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-links a {
  color: #dbeafe;
  font-weight: 700;
  font-size: 15px;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--cyan);
  opacity: 1;
}

.header-search {
  position: relative;
  flex: 1 1 300px;
  max-width: 430px;
}

.header-search input,
.hero-search input,
.filter-input,
.filter-select {
  width: 100%;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  background: rgba(15, 23, 42, 0.66);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  height: 42px;
  border-radius: 999px;
  padding: 0 44px 0 18px;
}

.header-search input:focus,
.hero-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.86);
}

.search-button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 20px;
  display: grid;
  gap: 14px;
}

.mobile-panel a {
  padding: 12px 0;
  color: #dbeafe;
  font-weight: 700;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.hero {
  position: relative;
  min-height: clamp(560px, 74vh, 760px);
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: clamp(560px, 74vh, 760px);
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  padding: 96px 0 88px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.30);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(37, 99, 235, 0.35);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.58);
}

.hero-description {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.pill,
.tag,
.rank-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.pill {
  padding: 6px 12px;
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.42);
  border: 1px solid rgba(96, 165, 250, 0.24);
  font-size: 13px;
}

.tag {
  padding: 6px 10px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.16);
  font-size: 12px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.20);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
  border-color: transparent;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #ffffff;
}

.hero-search {
  position: relative;
  max-width: 560px;
  margin-top: 26px;
}

.hero-search input {
  height: 54px;
  border-radius: 999px;
  padding: 0 128px 0 22px;
}

.hero-search .button {
  position: absolute;
  right: 5px;
  top: 5px;
  min-height: 44px;
  padding: 0 18px;
}

.section {
  padding: 56px 0;
}

.section-tight {
  padding-top: 34px;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card,
.category-card,
.info-card,
.rank-row,
.related-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(16px);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease, background 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.64));
}

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

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

.play-glow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.70));
  opacity: 0;
  transition: opacity 0.28s ease;
}

.play-glow span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.38);
}

.movie-card:hover .play-glow {
  opacity: 1;
}

.card-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  min-height: 48px;
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.42;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.22s ease;
}

.movie-card:hover .card-title,
.related-card:hover .card-title,
.rank-row:hover .rank-title {
  color: var(--cyan);
}

.card-desc {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.category-card {
  position: relative;
  min-height: 164px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  transition: transform 0.26s ease, border-color 0.26s ease, background 0.26s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -90px;
  top: -90px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.26), transparent 70%);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(15, 23, 42, 0.78);
}

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 21px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 132px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 18px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
}

.rank-row img {
  width: 132px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.42;
  transition: color 0.2s ease;
}

.rank-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.rank-hot {
  color: #fef3c7;
  font-weight: 900;
}

.page-hero {
  padding: 76px 0 42px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at 22% 20%, rgba(37, 99, 235, 0.30), transparent 32rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.54), transparent);
}

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

.breadcrumb a {
  color: #bfdbfe;
}

.page-title {
  margin: 0;
  max-width: 980px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.page-lead {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.58);
}

.filter-input,
.filter-select {
  height: 46px;
  border-radius: 14px;
  padding: 0 14px;
}

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

.player-card {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(2, 6, 23, 0.70);
  box-shadow: var(--shadow);
}

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

.player-stage video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.26s ease, visibility 0.26s ease;
  z-index: 3;
}

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

.player-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.42);
  transform: scale(1);
  transition: transform 0.22s ease;
}

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

.player-caption {
  padding: 18px 20px 22px;
}

.player-caption h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.info-card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.info-card h2,
.info-card h3 {
  margin: 0 0 14px;
}

.info-card p {
  margin: 0 0 16px;
  color: var(--muted-strong);
  line-height: 1.88;
}

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.related-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.34);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.58s ease;
}

.related-card .card-body {
  padding: 14px;
}

.site-footer {
  margin-top: 60px;
  padding: 34px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.56);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

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

.footer-links a:hover {
  color: var(--cyan);
}

.backtop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
  cursor: pointer;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-lg);
}

.empty-state.is-visible {
  display: block;
}

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

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

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

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    min-height: 640px;
  }

  .hero-copy {
    padding-top: 92px;
  }

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

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

  .rank-row {
    grid-template-columns: 46px 96px 1fr;
  }

  .rank-row img {
    width: 96px;
    height: 62px;
  }

  .rank-hot {
    display: none;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .container,
  .mobile-panel-inner {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 20px;
  }

  .grid-cards,
  .grid-categories,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-search input {
    padding-right: 18px;
  }

  .hero-search .button {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .page-hero {
    padding-top: 52px;
  }

  .player-button {
    width: 70px;
    height: 70px;
  }
}
