* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(125, 211, 252, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --gold: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(96, 165, 250, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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: 80;
  background: rgba(2, 6, 23, 0.84);
  border-bottom: 1px solid rgba(125, 211, 252, 0.16);
  backdrop-filter: blur(18px);
}

.header-inner,
.nav-strip-inner,
.footer-inner,
.page-container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.34);
}

.brand-text,
.footer-brand {
  font-size: 1.45rem;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.nav-strip-inner,
.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-link,
.nav-sub-link,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-sub-link:hover,
.footer-links a:hover,
.nav-link.active {
  color: var(--cyan);
}

.nav-strip {
  border-top: 1px solid rgba(125, 211, 252, 0.08);
}

.nav-strip-inner {
  min-height: 42px;
  font-size: 0.92rem;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 4px;
}

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  height: min(760px, 72vh);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.15) contrast(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.76) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 340px;
  align-items: center;
  gap: 48px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 12px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  font-size: 0.88rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.72);
}

.hero p {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 1.06rem;
  line-height: 1.9;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 10px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
}

.hero-actions,
.detail-info .primary-button {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
}

.ghost-button,
.section-more {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(15, 23, 42, 0.64);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 52px rgba(34, 211, 238, 0.22);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 32px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 14px;
  color: #020617;
  background: rgba(103, 232, 249, 0.92);
  border-radius: 999px;
  font-weight: 800;
}

.hero-tools {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-dots,
.hero-category-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  width: 58px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-category-links a {
  padding: 8px 13px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
}

.content-section,
.rank-panel,
.filter-panel,
.detail-content {
  width: min(1200px, calc(100% - 32px));
  margin: 72px auto;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 26px;
}

.section-heading.compact {
  display: block;
  margin-bottom: 18px;
}

.section-heading h2,
.story-card h2,
.related-links h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

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

.movie-card {
  overflow: hidden;
  min-width: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

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

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

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

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.poster-year {
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: #020617;
  background: rgba(250, 204, 21, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  color: #020617;
  background: rgba(103, 232, 249, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.movie-card-title {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}

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

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

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

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

.movie-card-compact .movie-card p {
  min-height: auto;
}

.rank-panel {
  position: relative;
  padding: 34px;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.72), rgba(15, 23, 42, 0.86));
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(5px);
  border-color: rgba(34, 211, 238, 0.38);
}

.rank-number {
  color: var(--gold);
  font-size: 1.25rem;
  font-weight: 900;
}

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

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

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

.rank-info small {
  margin-top: 6px;
  color: var(--muted);
}

.rank-play {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 28px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 180px;
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-body {
  padding: 22px;
}

.category-body span {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-body p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.page-title {
  width: min(1200px, calc(100% - 32px));
  margin: 58px auto 32px;
  padding: 38px;
  background:
    radial-gradient(circle at 86% 18%, rgba(34, 211, 238, 0.24), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.72));
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 32px;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  letter-spacing: -0.04em;
}

.page-title p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #cbd5e1;
  line-height: 1.85;
}

.filter-panel {
  margin-top: 36px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 26px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 14px;
}

.filter-controls label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 0.88rem;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 14px;
  outline: none;
  padding: 0 14px;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 46px 0 70px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.3;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.25);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.76), #020617);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

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

.breadcrumb em {
  color: #64748b;
  font-style: normal;
}

.detail-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-line {
  max-width: 820px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.9;
}

.player-section {
  margin-top: -32px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--text);
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.72));
  border: 0;
  cursor: pointer;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 50%;
  box-shadow: 0 20px 55px rgba(34, 211, 238, 0.28);
  font-size: 2rem;
}

.player-overlay strong {
  font-size: clamp(1.25rem, 4vw, 2.2rem);
}

.player-overlay small {
  color: #cbd5e1;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card,
.related-links {
  padding: 28px;
  background: var(--card);
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 28px;
}

.story-card p {
  margin: 16px 0 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.related-links {
  grid-column: 1 / -1;
}

.related-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related-links a {
  padding: 8px 13px;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.13);
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 999px;
}

.related-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.42);
}

.site-footer {
  margin-top: 86px;
  padding: 46px 0;
  background: rgba(2, 6, 23, 0.82);
  border-top: 1px solid rgba(125, 211, 252, 0.12);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 34px;
}

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

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

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

  .mobile-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    z-index: 90;
    display: none;
    padding: 18px;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

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

  .hero {
    height: auto;
    min-height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 58px 0 110px;
  }

  .hero-poster {
    display: none;
  }

  .hero-tools {
    display: grid;
  }

  .movie-grid,
  .rank-list,
  .category-grid,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .detail-cover {
    max-width: 260px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .nav-strip-inner,
  .footer-inner,
  .page-container,
  .content-section,
  .rank-panel,
  .filter-panel,
  .detail-content,
  .page-title {
    width: min(100% - 24px, 1200px);
  }

  .hero {
    min-height: 720px;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .rank-play {
    display: none;
  }

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

  .category-covers {
    height: 138px;
  }

  .page-title {
    padding: 26px;
  }

  .rank-panel {
    padding: 22px;
  }
}
