:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --orange: #fb923c;
  --red: #f43f5e;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #020617 38%, #000000 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.is-menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
}

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

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

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

.brand-text,
.footer-brand {
  font-size: 1.55rem;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-weight: 650;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan);
}

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

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--muted-strong);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 24px 18px;
  background: rgba(2, 6, 23, 0.98);
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #000;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(8, 47, 73, 0.74));
}

img.is-blank {
  opacity: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.94), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 72vh;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 7rem;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 14px 0 14px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 640px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.38);
  color: #bae6fd;
  font-size: 0.85rem;
  font-weight: 650;
  padding: 5px 12px;
}

.hero-actions,
.pager-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.section-link,
.rank-action,
.pager-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: white;
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.pager-links a:hover {
  transform: translateY(-2px);
}

.ghost-btn,
.pager-links a {
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.56);
  color: var(--muted-strong);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover,
.pager-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.48);
}

.hero-controls {
  position: absolute;
  right: clamp(24px, 7vw, 86px);
  bottom: 36px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-control {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  font-size: 1.7rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

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

.content-section {
  padding: 64px 0;
}

.content-section + .content-section {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.prose-card h2,
.side-card h2 {
  margin: 8px 0 0;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section-link {
  padding: 9px 17px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  color: var(--cyan);
  background: rgba(8, 47, 73, 0.34);
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.72));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  transform: translateZ(0);
}

.poster-frame {
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.72));
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.95);
  color: #001015;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.34);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-info {
  padding: 14px 2px 0;
}

.movie-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
}

.movie-info h3 {
  margin: 6px 0 6px;
  color: white;
  font-size: 1.02rem;
  line-height: 1.28;
}

.movie-info h3 a:hover {
  color: var(--cyan);
}

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

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

.tag-row span {
  padding: 3px 9px;
  font-size: 0.74rem;
}

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

.category-tile,
.category-overview-card,
.prose-card,
.side-card,
.rank-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.category-tile,
.category-overview-card {
  overflow: hidden;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.tile-images,
.overview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.overview-strip {
  grid-template-columns: repeat(4, 1fr);
}

.tile-images span,
.overview-strip span,
.rank-poster {
  display: block;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.72));
  background-position: center;
  background-size: cover;
}

.tile-images span {
  aspect-ratio: 1 / 1.2;
}

.overview-strip span {
  aspect-ratio: 1 / 1.3;
}

.category-tile strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  color: white;
  font-size: 1.28rem;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
}

.rank-panel {
  padding: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  padding: 12px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  background: rgba(34, 211, 238, 0.08);
  transform: translateX(4px);
}

.rank-no {
  color: var(--cyan);
  font-size: 1.05rem;
  font-weight: 900;
}

.rank-poster {
  width: 54px;
  height: 72px;
}

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

.rank-main strong {
  display: block;
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-action {
  min-width: 58px;
  padding: 7px 11px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-size: 0.8rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 54px;
  background:
    radial-gradient(circle at 22% 0%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.78));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.compact-hero h1 {
  max-width: 840px;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
}

.compact-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted-strong);
  font-size: 1.05rem;
}

.search-panel {
  max-width: 760px;
  margin-top: 28px;
}

.search-panel input {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  outline: 0;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  padding: 16px 22px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

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

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-btn {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  cursor: pointer;
  padding: 8px 14px;
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: rgba(34, 211, 238, 0.56);
  color: var(--cyan);
}

.empty-state {
  display: none;
  margin-top: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  padding: 30px;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 58px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  filter: blur(2px);
}

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

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.72));
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  max-width: 900px;
  font-size: clamp(2.2rem, 6vw, 5rem);
}

.detail-one-line {
  max-width: 760px;
  margin: 18px 0 24px;
  color: #dbeafe;
  font-size: 1.15rem;
}

.detail-tags {
  margin-bottom: 28px;
}

.watch-section {
  padding: 32px 0 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-action {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #031014;
  font-size: 2rem;
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.38);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.player-action:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .player-action {
  opacity: 0;
  pointer-events: none;
}

.detail-section {
  padding-top: 40px;
}

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

.prose-card,
.side-card {
  padding: 28px;
}

.prose-card h2,
.side-card h2 {
  color: white;
  font-size: 1.45rem;
}

.prose-card p {
  margin: 14px 0 26px;
  color: var(--muted-strong);
  font-size: 1rem;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 24px;
}

.side-card dl div {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 12px;
}

.side-card dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.side-card dd {
  margin: 0;
  color: white;
}

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

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #000);
  margin-top: 50px;
  padding: 46px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  margin-top: 34px;
  padding: 20px 0;
  font-size: 0.9rem;
}

[data-card].is-hidden {
  display: none;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding-bottom: 6rem;
  }

  .hero-controls {
    right: auto;
    left: 24px;
    bottom: 24px;
  }

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

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

  .category-grid,
  .overview-grid,
  .footer-grid,
  .detail-content-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .header-inner {
    height: 64px;
  }

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

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-content h1,
  .detail-copy h1 {
    font-size: 2.45rem;
  }

  .hero-meta,
  .detail-meta {
    gap: 7px;
  }

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

  .movie-info h3 {
    font-size: 0.95rem;
  }

  .movie-info p {
    font-size: 0.82rem;
  }

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

  .rank-action {
    display: none;
  }

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

  .player-action {
    width: 68px;
    height: 68px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
