* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(96, 165, 250, 0.22);
  --line-strong: rgba(96, 165, 250, 0.45);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --blue-soft: #60a5fa;
  --cyan: #22d3ee;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(37, 99, 235, 0.22);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.28), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.45);
}

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

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

.nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: rgba(248, 250, 252, 0.84);
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

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

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  min-height: 650px;
  display: grid;
  align-items: center;
  padding: 72px 0 48px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 24px -4% 0;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.20), rgba(15, 23, 42, 0.24));
  filter: blur(0.2px);
  z-index: -2;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: 44px;
  align-items: center;
  min-height: 520px;
}

.hero-slide.active {
  display: grid;
  animation: fadeSlide 0.65s ease both;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy {
  position: relative;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.26);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, #ffffff, #93c5fd 46%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-desc {
  margin: 22px 0 0;
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.25s ease;
  cursor: pointer;
}

.btn.primary {
  border: 0;
  background: linear-gradient(135deg, var(--blue), #2563eb);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.20);
  font-size: 13px;
}

.hero-poster {
  position: relative;
  min-height: 480px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.92));
}

.hero-poster-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-poster-info strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.hero-poster-info p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.hero-controls {
  position: absolute;
  left: 36px;
  bottom: 24px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--blue-soft);
}

.section {
  padding: 44px 0;
}

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

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

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 64, 175, 0.18));
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.28);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.22);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.78));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(59, 130, 246, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: 0.25s ease;
}

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

.type-badge {
  position: absolute;
  z-index: 3;
  top: 13px;
  left: 13px;
  max-width: calc(100% - 26px);
  padding: 6px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.88);
  backdrop-filter: blur(10px);
}

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

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

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

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

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--soft);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

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

.category-tile {
  min-height: 168px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.20), rgba(15, 23, 42, 0.78));
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 23px;
}

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

.page-hero {
  padding: 58px 0 26px;
}

.page-hero-card {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(37, 99, 235, 0.18));
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
}

.breadcrumb a:hover {
  color: white;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 20px 0 26px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.78);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 110px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  transition: 0.25s ease;
}

.rank-item:hover {
  border-color: var(--line-strong);
  transform: translateX(4px);
}

.rank-num {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #fde68a);
}

.rank-cover {
  width: 110px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
}

.rank-item h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-item p {
  margin: 0 0 11px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 36px 0 50px;
}

.player-card,
.detail-side,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 64px rgba(2, 6, 23, 0.26);
  overflow: hidden;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.42), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 34px;
  background: rgba(59, 130, 246, 0.92);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.48);
}

.player-start.is-hidden {
  display: none;
}

.detail-title {
  padding: 28px;
}

.detail-title h1 {
  font-size: clamp(30px, 4vw, 54px);
}

.detail-title p {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.detail-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 11px;
  border-radius: 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
}

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

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-section p {
  margin: 0;
  color: var(--soft);
  line-height: 1.95;
}

.detail-side {
  padding: 18px;
  height: max-content;
  position: sticky;
  top: 90px;
}

.detail-poster {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 18px;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.side-links img {
  width: 58px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
}

.side-links strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.side-links span {
  color: var(--muted);
  font-size: 12px;
}

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

.site-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 800;
}

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

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--soft);
}

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

.footer-links a:hover {
  color: #93c5fd;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.footer-bottom button {
  border: 0;
  color: #93c5fd;
  background: transparent;
  cursor: pointer;
}

.hidden-card {
  display: none !important;
}

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

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

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

  .detail-side {
    position: static;
  }
}

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

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

  main {
    padding: 0 16px;
  }

  .header-inner {
    padding: 12px 16px;
  }

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

  .hero {
    min-height: auto;
    padding-top: 36px;
  }

  .hero-copy,
  .page-hero-card {
    padding: 24px;
    border-radius: 24px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 390px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 42px 78px 1fr;
  }

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

  .rank-cover {
    width: 78px;
  }

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

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

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

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

  .btn {
    width: 100%;
  }
}
