* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #162033;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --cyan: #22d3ee;
  --cyan-strong: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 36%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 40%),
    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;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  max-width: 1440px;
  height: 68px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 28px rgba(34, 211, 238, 0.22);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-link {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(34, 211, 238, 0.13);
}

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

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  padding: 8px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.96);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(8, 145, 178, 0.18), rgba(37, 99, 235, 0.13)),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 28%);
}

.hero-track {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 72vh;
  padding: 88px 28px 86px;
}

.hero-slide {
  display: none;
  min-height: 58vh;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 52px;
  animation: fadeIn 0.45s ease both;
}

.hero-slide.is-active {
  display: grid;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
}

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

.hero p,
.page-hero p,
.player-caption p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  margin: 22px 0 0;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #e0f7ff;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  font-size: 12px;
}

.hero-actions,
.single-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #00111a;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  box-shadow: 0 18px 34px rgba(34, 211, 238, 0.2);
}

.ghost-btn,
.inline-link {
  color: var(--text);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.inline-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(2, 6, 23, 0.36);
}

.hero-poster,
.detail-poster {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.28), rgba(37, 99, 235, 0.16)), #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-poster span,
.detail-poster span,
.poster-fallback {
  position: absolute;
  z-index: 0;
  color: rgba(255, 255, 255, 0.22);
  font-size: 76px;
  font-weight: 900;
}

.hero-poster img,
.detail-poster img,
.poster-link img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease;
}

.hero-poster:hover img,
.detail-poster:hover img,
.poster-link:hover img {
  transform: scale(1.08);
}

img.is-hidden {
  opacity: 0;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

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

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 28px;
}

.wide-section {
  max-width: 1440px;
}

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 34px;
}

.left-heading {
  text-align: left;
  margin-left: 0;
}

.section-heading span {
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}

.section-heading h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

.section-heading p {
  color: var(--dim);
  margin: 0;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(22, 32, 51, 0.9);
}

.poster-link {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(37, 99, 235, 0.2)), #111827;
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.poster-meta {
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  color: white;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.rank-badge {
  right: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  justify-content: center;
  color: #06121a;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  display: -webkit-box;
  min-height: 64px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--dim);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.movie-card.compact .card-body p {
  -webkit-line-clamp: 2;
  min-height: 44px;
}

.search-panel {
  max-width: 720px;
  margin: 0 auto 30px;
}

.narrow-search {
  margin-left: 0;
}

.search-panel input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 16px;
  outline: none;
}

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

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

.category-card {
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(22, 32, 51, 0.72));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-card-main {
  display: block;
  padding: 24px;
}

.category-card-main span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.category-card-main h2 {
  margin: 6px 0 10px;
  font-size: 24px;
}

.category-card-main p {
  margin: 0;
  color: var(--dim);
}

.category-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 24px;
}

.category-card-links a {
  color: var(--muted);
  font-size: 13px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.46);
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.3fr;
  align-items: start;
  gap: 42px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-row span {
  color: var(--cyan);
  font-weight: 900;
}

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

.rank-row em {
  color: var(--dim);
  font-style: normal;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 76px 28px 34px;
}

.compact-hero {
  text-align: center;
  padding-top: 92px;
  padding-bottom: 50px;
}

.compact-hero p {
  margin-left: auto;
  margin-right: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--dim);
  margin-bottom: 22px;
}

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

.player-panel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.main-video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), rgba(2, 6, 23, 0.52));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: #00111a;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  box-shadow: 0 24px 48px rgba(34, 211, 238, 0.24);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-button span {
  display: inline-block;
  margin-left: 5px;
  font-size: 34px;
}

.play-button:hover {
  transform: scale(1.08);
}

.player-caption {
  margin-top: 22px;
}

.player-caption h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
}

.detail-poster {
  min-height: 420px;
  border-radius: 24px;
}

.meta-list {
  margin-top: 18px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.meta-list p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.meta-list p:last-child {
  border-bottom: 0;
}

.meta-list strong {
  color: var(--muted);
}

.meta-list span {
  text-align: right;
}

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

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

.detail-panel,
.side-links {
  padding: 26px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  border-radius: 22px;
  margin-bottom: 20px;
}

.detail-panel h2,
.side-links h2,
.site-footer h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-panel p {
  margin: 0;
  color: var(--muted);
  white-space: pre-line;
}

.side-links {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.side-links a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
}

.side-links a:hover {
  color: white;
  background: rgba(34, 211, 238, 0.16);
}

.site-footer {
  margin-top: 40px;
  padding: 54px 28px;
  background: rgba(2, 6, 23, 0.62);
  border-top: 1px solid var(--line);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: var(--cyan);
  font-size: 22px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.footer-links a:hover {
  color: white;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide,
  .detail-grid,
  .detail-content,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-track {
    padding-top: 58px;
  }

  .hero-poster {
    min-height: 360px;
  }

  .detail-poster {
    min-height: 360px;
  }

  .side-links {
    position: static;
  }

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

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

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

  .rank-row em {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .section,
  .page-hero,
  .detail-hero,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .hero-track {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero p,
  .page-hero p,
  .player-caption p {
    font-size: 16px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    min-height: 42px;
    font-size: 15px;
  }

  .card-body p {
    font-size: 13px;
  }

  .player-panel {
    border-radius: 18px;
  }

  .play-button {
    width: 68px;
    height: 68px;
  }
}
