:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c32;
  --panel-strong: #17233a;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --rose: #f43f5e;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  --radius: 22px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 18%, rgba(139, 92, 246, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
}

.nav-bar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  position: relative;
  color: var(--muted-strong);
  font-size: 15px;
  transition: color 0.2s ease;
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -23px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.nav-search input,
.search-box-large input,
.filter-bar input,
.filter-bar select,
.quick-filter input {
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

.nav-search input {
  width: 150px;
  padding: 8px 8px 8px 12px;
}

.nav-search button,
.search-box-large button {
  border: 0;
  cursor: pointer;
  color: white;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.nav-search button {
  padding: 8px 15px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: white;
}

.hero-slider {
  position: relative;
  min-height: calc(100vh - 68px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.hero-backdrop {
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: blur(5px) saturate(1.25) brightness(0.55);
}

.hero-vignette {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 46%, rgba(2, 6, 23, 0.4) 100%),
    radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.28), transparent 26rem);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 380px);
  align-items: center;
  gap: 62px;
  padding: 70px 0 110px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(14, 165, 233, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.lead-text {
  max-width: 740px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

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

.narrow-actions {
  margin-top: 18px;
}

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

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

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.34);
}

.btn.secondary,
.btn.ghost {
  border: 1px solid var(--line-strong);
  color: white;
  background: rgba(15, 23, 42, 0.62);
}

.btn.secondary:hover,
.btn.ghost:hover {
  border-color: rgba(34, 211, 238, 0.56);
  background: rgba(30, 41, 59, 0.78);
}

.hero-poster {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-8deg) rotateX(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 16px;
  border-radius: 18px;
  text-align: center;
  font-weight: 900;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.54);
  backdrop-filter: blur(10px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.52);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.page-main {
  padding: 42px 0 20px;
}

.quick-filter,
.filter-bar {
  display: grid;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.22);
}

.quick-filter {
  grid-template-columns: 1fr minmax(260px, 420px);
}

.quick-filter h2,
.quick-filter p {
  margin: 0;
}

.quick-filter p {
  margin-top: 6px;
  color: var(--muted);
}

.quick-filter input,
.filter-bar input,
.filter-bar select,
.search-box-large input {
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
}

.filter-bar {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px);
}

.content-section {
  margin: 56px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: #bfdbfe;
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(59, 130, 246, 0.56);
  box-shadow: 0 26px 62px rgba(2, 6, 23, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.36s ease, filter 0.36s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(0.88) saturate(1.12);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--violet));
  font-size: 12px;
}

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

.movie-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #bfdbfe;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #475569;
}

.movie-card p {
  margin: 10px 0 12px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
}

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

.category-chip,
.category-card-large a {
  display: block;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 9rem),
    rgba(15, 23, 42, 0.7);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-chip:hover,
.category-card-large a:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.5);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 10rem),
    rgba(15, 23, 42, 0.86);
}

.category-chip strong,
.category-card-large h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 20px;
}

.category-chip span,
.category-card-large p,
.category-card-large span {
  color: var(--muted);
  line-height: 1.7;
}

.category-card-large em {
  display: inline-flex;
  margin-top: 18px;
  color: #bfdbfe;
  font-style: normal;
  font-weight: 800;
}

.rank-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.58);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(59, 130, 246, 0.5);
}

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

.rank-num {
  color: #bfdbfe;
  font-weight: 900;
  text-align: center;
}

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

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-score {
  color: #fde68a;
  font-weight: 900;
  text-align: right;
}

.page-hero {
  position: relative;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 22%, rgba(59, 130, 246, 0.24), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.74));
}

.compact-hero h1,
.search-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.search-box-large {
  display: flex;
  max-width: 720px;
  gap: 12px;
  margin-top: 26px;
}

.search-box-large input {
  flex: 1;
}

.search-box-large button {
  min-width: 110px;
  padding: 0 22px;
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 20rem),
    rgba(15, 23, 42, 0.68);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 64px);
}

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

.player-section {
  margin: 36px 0;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(59, 130, 246, 0.25), transparent 16rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

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

.player-overlay.is-error strong {
  color: #fecaca;
}

.play-ring {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 46px rgba(59, 130, 246, 0.42);
  font-size: 30px;
}

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

.detail-article,
.detail-side {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  color: var(--muted-strong);
  line-height: 2;
  font-size: 16px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  min-width: 0;
  margin: 0;
  color: white;
  line-height: 1.6;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1fr 1fr;
  gap: 30px;
  padding: 46px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 6px 0;
}

.site-footer a:hover {
  color: white;
}

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

.footer-tags a {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

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

  .nav-menu {
    gap: 12px;
  }

  .nav-link {
    font-size: 14px;
  }
}

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

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link.active::after {
    display: none;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-inner,
  .detail-hero,
  .detail-content-grid,
  .quick-filter,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 30px;
    padding-top: 46px;
  }

  .hero-poster {
    max-width: 330px;
    transform: none;
  }

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

  .category-grid,
  .category-large-grid,
  .rank-list.expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-list {
    grid-template-columns: 1fr;
  }
}

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-summary,
  .page-hero p,
  .lead-text {
    font-size: 16px;
  }

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

  .category-grid,
  .category-large-grid,
  .filter-bar,
  .search-box-large {
    grid-template-columns: 1fr;
  }

  .search-box-large {
    display: grid;
  }

  .page-hero,
  .detail-hero,
  .detail-article,
  .detail-side,
  .rank-panel {
    padding: 22px;
    border-radius: 24px;
  }

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

  .hero-controls {
    bottom: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .rank-list.expanded {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .narrow-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
