:root {
  color-scheme: dark;
  --site-bg: #020617;
  --site-panel: rgba(15, 23, 42, 0.88);
  --site-panel-strong: rgba(15, 23, 42, 0.96);
  --site-border: rgba(148, 163, 184, 0.18);
  --site-cyan: #22d3ee;
  --site-cyan-dark: #0891b2;
  --site-text: #f8fafc;
  --site-muted: #94a3b8;
  --site-soft: #cbd5e1;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(30, 41, 59, 0.8), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--site-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

.site-shell {
  min-height: 100vh;
}

.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.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.logo-mark {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, #06b6d4, #0f172a 72%);
  box-shadow: 0 18px 45px rgba(8, 145, 178, 0.32);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-title {
  font-size: 1.18rem;
}

.logo-subtitle {
  margin-top: 0.18rem;
  color: var(--site-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link,
.mobile-link {
  border-radius: 0.85rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.62rem 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active {
  background: rgba(8, 145, 178, 0.18);
  color: #ffffff;
}

.mobile-toggle {
  display: none;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
}

.mobile-menu {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
}

.mobile-menu.is-open {
  display: grid;
  gap: 0.4rem;
}

.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.25rem;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 76vh;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 2rem;
  background: #020617;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  min-height: 76vh;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.6s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: clamp(2rem, 5vw, 4.8rem);
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  color: var(--site-cyan);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0.75rem 0 1rem;
  max-width: 720px;
  color: #ffffff;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.07em;
  text-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.hero-summary {
  max-width: 690px;
  margin: 0 0 1.35rem;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.meta-pill,
.tag-pill,
.filter-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.72rem;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  border-radius: 999px;
  font-weight: 800;
  padding: 0.75rem 1.25rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #00111a;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28);
}

.btn-secondary {
  border: 1px solid rgba(203, 213, 225, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
}

.btn-ghost {
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(8, 145, 178, 0.13);
  color: #cffafe;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(1.25rem, 4vw, 3rem);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.hero-dot.is-active {
  width: 2.3rem;
  background: #22d3ee;
}

.section-block {
  margin-top: 3rem;
}

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

.section-title {
  margin: 0.35rem 0 0;
  color: #ffffff;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 760px;
  margin: 0.7rem 0 0;
  color: var(--site-muted);
  line-height: 1.8;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  margin: 1.25rem 0 1.6rem;
}

.search-input,
.select-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  outline: none;
  padding: 0.9rem 1rem;
  box-sizing: border-box;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 11rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.4rem;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 12rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  padding: 1.25rem;
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-card:hover,
.related-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.category-card h2,
.category-card h3 {
  margin: 0.5rem 0 0.7rem;
  font-size: 1.35rem;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card.is-hidden {
  display: none;
}

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

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.35s ease, opacity 0.3s ease;
}

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

.poster-badge {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.52rem;
  backdrop-filter: blur(8px);
}

.card-play {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: #22d3ee;
  color: #00111a;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.25);
}

.movie-info {
  padding: 0.9rem;
}

.movie-title {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
}

.movie-line {
  margin: 0.52rem 0 0;
  color: var(--site-muted);
  display: -webkit-box;
  min-height: 3.3rem;
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card .movie-meta {
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.movie-card .meta-pill {
  font-size: 0.68rem;
  padding: 0.24rem 0.46rem;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.78);
  padding: 0.75rem;
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.rank-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.92);
}

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

.rank-num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-bottom-right-radius: 0.65rem;
  background: #22d3ee;
  color: #00111a;
  font-size: 0.8rem;
  font-weight: 900;
}

.rank-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 850;
}

.rank-desc {
  margin: 0.4rem 0 0;
  color: var(--site-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.2rem;
  color: var(--site-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #cffafe;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 1.4rem;
  align-items: stretch;
}

.detail-cover,
.player-card,
.detail-panel {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  min-height: 31rem;
  object-fit: cover;
}

.detail-panel {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-title {
  margin: 0.7rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-summary {
  color: #dbeafe;
  font-size: 1.04rem;
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.player-card {
  position: relative;
  margin-top: 2rem;
  background: #020617;
}

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

.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.68));
  color: #ffffff;
  cursor: pointer;
}

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

.play-button {
  display: grid;
  width: clamp(4rem, 10vw, 6rem);
  height: clamp(4rem, 10vw, 6rem);
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #00111a;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  box-shadow: 0 20px 55px rgba(34, 211, 238, 0.36);
}

.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.35rem;
  background: rgba(15, 23, 42, 0.72);
  padding: clamp(1rem, 3vw, 1.55rem);
}

.content-panel h2 {
  margin: 0 0 0.75rem;
  color: #ffffff;
  font-size: 1.35rem;
}

.content-panel p {
  margin: 0.7rem 0 0;
  color: #cbd5e1;
  line-height: 1.95;
}

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

.related-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0f172a;
}

.related-card h3 {
  margin: 0;
  padding: 0.72rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.45rem 1.25rem;
  color: var(--site-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

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

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

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

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

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

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

  .hero,
  .hero-slide {
    min-height: 68vh;
    border-radius: 1.35rem;
  }

  .hero-content {
    padding: 2rem 1.25rem;
  }

  .hero-controls {
    left: 1.25rem;
    right: auto;
  }

  .section-head,
  .tool-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .detail-hero {
    gap: 1rem;
  }

  .detail-cover img {
    min-height: auto;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .page-main {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .logo-subtitle {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .rank-list,
  .detail-hero,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 4.6rem minmax(0, 1fr);
  }

  .hero-title {
    letter-spacing: -0.04em;
  }
}
