:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: #0f172a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --cyan: #06b6d4;
  --cyan-strong: #0891b2;
  --blue: #2563eb;
  --pink: #db2777;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.25), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--pink));
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.25);
}

.logo-text {
  font-size: 1.1rem;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.14);
}

.menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

main {
  min-height: 70vh;
}

.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem;
}

.hero-stage {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-radius: 1.6rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.75));
  box-shadow: var(--shadow);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: saturate(1.1);
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.3)), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  padding: clamp(2rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

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

.hero-copy p,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 1.1rem 0 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.12);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-tags,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.45rem;
}

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.28);
}

.ghost-btn {
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.72);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 1.35rem;
  background: linear-gradient(160deg, rgba(8, 145, 178, 0.28), rgba(15, 23, 42, 0.9));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.hero-poster span {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.8rem;
  border-radius: 1rem;
  text-align: center;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 1rem;
}

.hero-control.next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 6;
  display: flex;
  gap: 0.45rem;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 2rem;
  background: var(--cyan);
}

.search-band,
.page-hero,
.content-section,
.detail-content,
.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.4rem 1rem;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.3rem;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.text-panel h2,
.site-footer h2 {
  margin: 0;
  font-size: 1.45rem;
}

.search-band p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.search-band label {
  display: grid;
  gap: 0.4rem;
  color: #cbd5e1;
}

.search-band input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: 0;
  border-radius: 999px;
  padding: 0.85rem 1rem;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.82);
}

.search-band input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.page-hero {
  margin-top: 1rem;
}

.small-hero > div {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.6rem;
  background: radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.24), transparent 26rem), linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.7));
  box-shadow: var(--shadow);
}

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

.section-head a {
  color: #67e8f9;
  font-weight: 700;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1rem;
}

.movie-grid.six-col {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-grid.four-col {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.rail-list {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}

.rail-list .movie-card {
  width: 190px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.movie-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

.cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.22), rgba(15, 23, 42, 0.95));
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .cover-shade {
  opacity: 1;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-year {
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.76);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-body {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
}

.card-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta,
.card-desc {
  color: var(--muted);
  font-size: 0.86rem;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.category-grid.big {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.category-card,
.category-tile {
  display: grid;
  gap: 0.65rem;
  overflow: hidden;
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.55));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong,
.category-tile strong {
  font-size: 1.18rem;
}

.category-card span,
.category-tile em {
  color: var(--muted);
  font-style: normal;
}

.tile-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.3rem;
}

.tile-thumbs img {
  aspect-ratio: 2 / 3;
  width: 100%;
  border-radius: 0.75rem;
  object-fit: cover;
  background: rgba(2, 6, 23, 0.7);
}

.rank-list {
  display: grid;
  gap: 0.65rem;
}

.rank-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rank-item {
  display: grid;
  grid-template-columns: 3rem 4rem 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-thumb img {
  width: 4rem;
  height: 5.8rem;
  object-fit: cover;
  border-radius: 0.75rem;
  background: rgba(2, 6, 23, 0.7);
}

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

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

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

.rank-score {
  color: #67e8f9;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 62vh;
}

.detail-layout {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 1rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.3rem;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.2), rgba(15, 23, 42, 0.95));
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #67e8f9;
  margin-bottom: 1rem;
}

.player-section {
  padding-top: 2rem;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.35rem;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.8rem;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.28), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.video-overlay span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.3);
  font-size: 2rem;
}

.video-overlay strong {
  font-size: 1.15rem;
}

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

.text-panel {
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.68);
}

.text-panel p {
  margin-bottom: 0;
  color: #cbd5e1;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

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

.footer-links {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #64748b;
  font-size: 0.9rem;
}

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

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

  .menu-button {
    display: block;
  }

  .hero-content,
  .detail-layout,
  .detail-content,
  .search-band,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(2.1rem, 13vw, 4rem);
  }

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

@media (max-width: 640px) {
  .hero {
    padding: 0.6rem;
  }

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

  .hero-control {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .movie-grid.six-col,
  .movie-grid.four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item {
    grid-template-columns: 2.8rem 3.4rem 1fr;
  }

  .rank-score {
    display: none;
  }

  .rank-thumb img {
    width: 3.4rem;
    height: 4.9rem;
  }

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