:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.7);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #0891b2;
  --yellow: #facc15;
  --radius: 18px;
  --shadow: 0 28px 70px rgba(2, 8, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 5%, rgba(34, 211, 238, 0.16), transparent 26rem),
    radial-gradient(circle at 84% 16%, rgba(14, 165, 233, 0.12), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.26);
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 8px;
}

.desktop-nav {
  display: flex;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: white;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-nav.open {
  display: grid;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.72);
  transform: scale(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, var(--bg), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  align-items: end;
  gap: 44px;
  padding: 96px 0 70px;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
  letter-spacing: -0.055em;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-summary {
  color: var(--muted-strong) !important;
  font-size: 16px !important;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-actions,
.section-actions,
.filter-bar,
.card-meta,
.detail-meta,
.breadcrumbs,
.tag-row,
.hero-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn,
.hero-button,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-strong));
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(8, 145, 178, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.hero-button:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(8, 145, 178, 0.36);
}

.btn.secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: none;
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
}

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

.hero-poster span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--yellow);
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 26px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--cyan);
}

.hero-arrows {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 26px;
  display: flex;
  gap: 10px;
}

.hero-arrows button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.main,
.page-hero,
.detail-layout,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.main {
  padding: 58px 0 72px;
}

.page-hero {
  padding: 62px 0 16px;
}

.page-hero h1,
.detail-title h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.page-hero p,
.section-head p,
.detail-title p {
  max-width: 820px;
  margin: 0;
  color: var(--muted-strong);
}

.section {
  margin-top: 56px;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.movie-card-compact .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.poster-link:hover img,
.related-card:hover img {
  transform: scale(1.08);
  filter: brightness(0.86);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.78));
}

.score,
.rank-badge,
.play-mark,
.card-category,
.related-score {
  position: absolute;
  border-radius: 999px;
  font-weight: 800;
}

.score {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  background: rgba(2, 6, 23, 0.76);
  color: var(--yellow);
  font-size: 13px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: white;
}

.play-mark {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: rgba(34, 211, 238, 0.84);
  color: white;
  font-size: 20px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.poster-link:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 12px 2px 0;
}

.card-meta {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.card-category {
  position: static;
  padding: 3px 8px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
}

.movie-card h3 {
  margin: 0 0 6px;
  color: white;
  font-size: 16px;
  line-height: 1.28;
}

.movie-card h3 a:hover,
.related-card:hover strong,
.text-link:hover {
  color: var(--cyan);
}

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

.tag-row span,
.hero-tags span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 12px;
  background: rgba(15, 23, 42, 0.66);
}

.search-panel,
.category-card,
.detail-card,
.watch-card,
.related-section,
.ranking-strip {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 22px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(120px, 0.5fr));
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.62);
  color: white;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  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: 18px;
}

.category-card {
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

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

.ranking-strip {
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 90px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row .num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-weight: 900;
}

.rank-row img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rank-row .rank-score {
  color: var(--yellow);
  font-weight: 900;
}

.breadcrumbs {
  margin: 28px 0 22px;
}

.detail-layout {
  padding: 24px 0 72px;
}

.watch-card {
  overflow: hidden;
  margin-bottom: 28px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 32%),
    rgba(2, 6, 23, 0.38);
  color: white;
  cursor: pointer;
  z-index: 3;
}

.player-overlay.is-hidden {
  display: none;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
  font-size: 32px;
  text-indent: 5px;
}

.detail-card {
  padding: clamp(22px, 4vw, 38px);
  margin-bottom: 28px;
}

.detail-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 28px;
  align-items: start;
  margin-bottom: 26px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

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

.detail-meta {
  margin: 18px 0 10px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: var(--muted-strong);
}

.related-section {
  padding: clamp(20px, 4vw, 30px);
}

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

.related-card {
  position: relative;
  display: block;
}

.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  overflow: hidden;
  border-radius: 16px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.related-score {
  right: 8px;
  top: 8px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.76);
  color: var(--yellow);
  font-size: 12px;
}

.related-card strong {
  display: block;
  margin-top: 8px;
  line-height: 1.3;
}

.related-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.site-footer {
  padding: 46px 0 30px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

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

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.footer-links a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

.empty-state.show {
  display: block;
}

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

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

  .hero-content {
    grid-template-columns: 1fr 300px;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 74px;
  }

  .hero-panel {
    display: none;
  }

  .hero-arrows {
    right: 16px;
  }

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

  .filter-bar,
  .detail-title,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 240px;
  }

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

  .rank-row .rank-score {
    display: none;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .main,
  .page-hero,
  .detail-layout,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .hero-content {
    width: min(100% - 24px, 1180px);
    padding-bottom: 82px;
  }

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

  .movie-card p,
  .tag-row {
    display: none;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row img {
    width: 72px;
    height: 52px;
  }
}
