:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.15), transparent 32rem),
    radial-gradient(circle at 80% 14%, rgba(59, 130, 246, 0.14), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.24);
}

.brand strong,
.footer-brand {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #cbd5e1;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  background: var(--cyan);
  transition: right 0.25s ease;
}

.main-nav a:hover {
  color: var(--cyan);
}

.main-nav a:hover::after {
  right: 0;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.hero {
  position: relative;
  height: 78vh;
  min-height: 580px;
  margin-top: 64px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 46%, transparent 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.46) 48%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
}

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

.hero-tags,
.tag-list,
.detail-meta,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.tag-list span {
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  font-size: 13px;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero p {
  max-width: 650px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta {
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: #64748b;
}

.hero-actions,
.spotlight-links,
.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-button,
.ghost-button,
.spotlight-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.primary-button {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.ghost-button,
.spotlight-links a {
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

.primary-button:hover,
.ghost-button:hover,
.spotlight-links a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(34, 211, 238, 0.45);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
  color: #fff;
  font-size: 38px;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(15, 23, 42, 0.82);
}

.hero-prev {
  left: 20px;
  transform: translateY(-50%);
}

.hero-next {
  right: 20px;
  transform: translateY(-50%);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

.home-main,
.page-main {
  padding: 56px 0 80px;
}

.page-main,
.detail-main {
  padding-top: 104px;
}

.home-main > section,
.page-main > section {
  margin-bottom: 72px;
}

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

.section-head h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head h2 {
  position: relative;
  display: inline-block;
  font-size: clamp(25px, 3vw, 36px);
  padding-bottom: 8px;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-head p,
.page-hero p,
.spotlight-card p,
.poster-panel p,
.detail-card p {
  color: var(--muted);
  line-height: 1.8;
}

.section-actions {
  display: flex;
  gap: 10px;
}

.section-actions button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.92);
  font-size: 28px;
}

.movie-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.movie-strip::-webkit-scrollbar {
  display: none;
}

.strip-item {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card-wide .poster {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%) scale(0.86);
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.movie-info {
  display: block;
  padding: 16px;
}

.movie-info strong {
  display: block;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong {
  color: var(--cyan);
}

.movie-info em {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.meta-row span {
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.6);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.rank-list,
.rank-page-list,
.related-panel,
.poster-panel,
.detail-card,
.player-card,
.spotlight-card,
.search-panel,
.page-hero,
.category-tile {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.14);
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover,
.rank-card:hover,
.related-card:hover {
  background: rgba(34, 211, 238, 0.08);
}

.rank-row > span,
.rank-num {
  color: var(--cyan);
  font-weight: 900;
  font-size: 20px;
}

.rank-row strong,
.rank-card strong,
.related-card strong {
  color: #fff;
}

.rank-row em,
.rank-info em,
.related-card small {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-top: 4px;
}

.spotlight-card {
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 38%),
    rgba(15, 23, 42, 0.72);
}

.spotlight-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.spotlight-links {
  margin-top: 24px;
}

.page-hero {
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.1) 42%, rgba(15, 23, 42, 0.85)),
    var(--panel-strong);
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  margin-bottom: 12px;
}

.small-hero {
  margin-bottom: 46px;
}

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

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

.category-tile {
  display: block;
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  font-size: 21px;
  color: #fff;
}

.category-tile span {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.search-panel {
  padding: 18px;
  margin-bottom: 24px;
}

.search-panel label {
  display: grid;
  gap: 10px;
  color: #cbd5e1;
  font-weight: 700;
}

.search-panel input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(2, 6, 23, 0.66);
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.filter-empty {
  margin-top: 14px;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pagination a {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
}

.pagination a:hover,
.pagination a.is-current {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.52);
  background: rgba(34, 211, 238, 0.18);
}

.catalog-links a {
  min-width: auto;
}

.rank-page-list {
  overflow: hidden;
}

.rank-card {
  display: grid;
  grid-template-columns: 54px 88px 1fr 64px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.rank-card:last-child {
  border-bottom: 0;
}

.rank-card img {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-info em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-info span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-top: 8px;
}

.rank-score {
  color: var(--cyan);
  font-weight: 900;
  font-size: 22px;
}

.detail-main {
  padding-bottom: 80px;
}

.back-link {
  display: inline-flex;
  color: var(--muted);
  margin-bottom: 22px;
}

.back-link:hover {
  color: var(--cyan);
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 22px;
  background: #000;
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translate(-50%, -50%);
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 55px rgba(34, 211, 238, 0.32);
  font-weight: 900;
  z-index: 4;
}

.play-toggle.is-hidden {
  display: none;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 16px;
}

.detail-meta {
  color: #cbd5e1;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(51, 65, 85, 0.56);
}

.detail-card section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 24px;
}

.detail-card h2,
.related-panel h2,
.poster-panel h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  white-space: pre-line;
}

.detail-side {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 20px;
}

.poster-panel,
.related-panel {
  padding: 20px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
  margin-bottom: 18px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-card img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.96));
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

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

.site-footer a:not(.footer-brand) {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 20px;
  font-size: 14px;
}

[hidden],
.is-filtered-out {
  display: none !important;
}

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

  .wide-grid,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
    grid-template-columns: 0.7fr 1fr;
  }

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

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

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

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.97);
  }

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

  .main-nav a {
    padding: 13px 12px;
    border-radius: 12px;
  }

  .main-nav a:hover {
    background: rgba(34, 211, 238, 0.1);
  }

  .main-nav a::after {
    display: none;
  }

  .brand small {
    display: none;
  }

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .hero-copy {
    padding: 0 12px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .primary-button,
  .ghost-button {
    min-width: 142px;
  }

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

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

  .movie-info {
    padding: 12px;
  }

  .movie-info em {
    display: none;
  }

  .split-section,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding: 28px;
  }

  .rank-card {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-card img {
    width: 70px;
    height: 96px;
  }

  .rank-score {
    grid-column: 2 / 4;
    padding-left: 86px;
  }

  .detail-card {
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

  .strip-item {
    flex-basis: 245px;
  }
}
