* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --card: rgba(30, 41, 59, 0.72);
  --card-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --primary: #38bdf8;
  --primary-strong: #0284c7;
  --accent: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem),
    radial-gradient(circle at 82% 10%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}

.brand-text {
  font-size: 1.45rem;
  background: linear-gradient(90deg, #7dd3fc, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  cursor: pointer;
  padding: 11px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px;
  color: var(--muted);
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--primary);
}

.mobile-nav.open {
  display: block;
  animation: slideUp 0.3s ease both;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
}

.hero-bg.active {
  opacity: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 46%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 34px;
  align-items: center;
  padding: 68px 0;
}

.hero-copy {
  max-width: 760px;
  animation: slideUp 0.6s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #bae6fd;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 span,
.page-hero h1 span,
.detail-hero h1 span {
  background: linear-gradient(90deg, #f8fafc, #7dd3fc 56%, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.85;
  max-width: 690px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.68);
  color: #ffffff;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(125, 211, 252, 0.45);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.28);
}

.hero-panel {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 10;
  background: rgba(15, 23, 42, 0.95);
}

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

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

.hero-mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.hero-dot {
  border: 0;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  opacity: 0.62;
  outline: 2px solid transparent;
  background: transparent;
  transition: opacity 0.2s ease, transform 0.2s ease, outline-color 0.2s ease;
}

.hero-dot.active,
.hero-dot:hover {
  opacity: 1;
  transform: translateY(-2px);
  outline-color: rgba(56, 189, 248, 0.72);
}

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

.section {
  padding: 54px 0 0;
}

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

.section-head h2,
.page-block h2,
.detail-block h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

.section-head p,
.page-hero p,
.category-intro,
.detail-subtitle {
  color: var(--muted);
  line-height: 1.8;
  margin: 10px 0 0;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.34);
}

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

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

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

.score {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.82);
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 900;
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--dim);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.meta-row a {
  color: #7dd3fc;
}

.movie-card h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.42;
}

.movie-card h2 a:hover {
  color: var(--primary);
}

.movie-card p {
  color: var(--muted);
  line-height: 1.65;
  min-height: 3.2em;
  margin: 10px 0 0;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.info-pill,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(14, 165, 233, 0.1);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.16);
  font-size: 0.78rem;
}

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

.category-card,
.page-panel,
.rank-panel,
.detail-block,
.player-card {
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
}

.category-card {
  min-height: 188px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.category-card::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
}

.category-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

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

.category-card span {
  color: var(--primary);
  font-weight: 800;
}

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

.rank-panel {
  padding: 18px;
}

.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 38px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  color: var(--muted);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.72);
  transform: translateX(3px);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 11px;
}

.rank-title {
  color: #ffffff;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #fbbf24;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  padding: 58px 0 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  margin: 22px 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.62);
  color: #ffffff;
  min-height: 48px;
  padding: 0 16px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(56, 189, 248, 0.52);
}

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

.player-card {
  padding: 18px;
}

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
}

.player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.38));
  z-index: 5;
}

.player.is-playing .play-layer {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.34);
  font-size: 2.3rem;
  padding-left: 5px;
}

.play-title {
  font-size: 1.15rem;
  font-weight: 900;
}

.detail-block {
  padding: 24px;
  margin-top: 22px;
}

.detail-block p {
  color: var(--muted);
  line-height: 1.92;
  margin: 14px 0 0;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.info-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  line-height: 1.6;
}

.info-line strong {
  width: 76px;
  flex: 0 0 76px;
  color: #ffffff;
}

.side-poster {
  position: sticky;
  top: 96px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.side-poster img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.site-footer {
  margin-top: 70px;
  padding: 44px 0 24px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--dim);
  line-height: 1.8;
  font-size: 0.94rem;
}

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

.footer-grid a:hover {
  color: var(--primary);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .side-poster {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .container,
  .nav-wrap,
  .hero-inner,
  .footer-grid,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 44px 0;
  }

  .hero-panel {
    display: none;
  }

  .movie-grid,
  .movie-grid.compact-grid,
  .related-grid,
  .category-grid,
  .rank-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .brand-text {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.compact-grid,
  .related-grid,
  .category-grid,
  .rank-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 34px 46px minmax(0, 1fr) auto;
  }

  .rank-item img {
    width: 46px;
    height: 62px;
  }
}
