:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(34, 211, 238, 0.22);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --violet: #8b5cf6;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 80% 18%, rgba(139, 92, 246, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #67e8f9 45%, #a78bfa);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.38);
}

.brand-text {
  font-size: clamp(18px, 2vw, 24px);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--soft);
  font-weight: 650;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active,
.footer-links a:hover {
  color: var(--cyan);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

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

.mobile-nav a {
  display: block;
  padding: 11px 0;
  color: var(--soft);
  font-weight: 650;
}

.mobile-nav.is-open {
  display: block;
}

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.82) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, transparent 38%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 2;
}

.hero-copy {
  max-width: 680px;
  padding-top: 42px;
}

.hero-badge,
.section-head span,
.page-hero span,
.content-card span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 60px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 620px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-meta span,
.detail-meta span,
.movie-meta span {
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

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

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

.btn-primary {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.24);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(2, 6, 23, 0.66);
  font-size: 38px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
}

.hero-dot.is-active {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.7);
}

.section {
  padding: 66px 0;
}

.lift-section {
  margin-top: -54px;
  position: relative;
  z-index: 8;
  padding-top: 0;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.section-head h2,
.page-hero h1,
.content-card h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.content-card p,
.category-panel p,
.category-overview-card p,
.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.with-search {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.search-panel {
  min-width: min(420px, 100%);
}

.search-panel input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  outline: none;
  padding: 0 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

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

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

.category-panel,
.category-overview-card,
.content-card,
.ranking-box,
.rank-list,
.player-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.category-panel {
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.category-panel::after,
.content-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.12);
  filter: blur(10px);
}

.category-panel span {
  color: var(--cyan);
  font-weight: 900;
  font-size: 20px;
}

.category-panel strong {
  display: block;
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 48px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  align-items: start;
}

.ranking-box {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.compact-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover,
.rank-row:hover {
  border-color: var(--line);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}

.compact-card img,
.rank-row img {
  width: 68px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 13px;
  background: #0f172a;
}

.compact-card span {
  min-width: 0;
}

.compact-card strong,
.compact-card em,
.rank-copy strong,
.rank-copy em,
.rank-copy small {
  display: block;
}

.compact-card strong,
.rank-copy strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em,
.rank-copy em,
.rank-copy small {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.5);
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 45%);
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #001018;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
}

.movie-card-body {
  padding: 15px;
  display: grid;
  gap: 9px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 45px;
}

.movie-card p {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
}

.movie-meta {
  justify-content: space-between;
  gap: 7px;
}

.movie-meta span {
  font-size: 12px;
  padding: 4px 8px;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  font-size: 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filter-row button {
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
  padding: 0 16px;
  cursor: pointer;
}

.filter-row button:hover,
.filter-row button.is-active {
  color: #001018;
  border-color: transparent;
  background: var(--cyan);
}

.empty-state {
  display: none;
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
}

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

.page-hero {
  position: relative;
  padding: 92px 0 70px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), transparent 28%),
    linear-gradient(90deg, #020617, #0f172a);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 18px 0 18px;
  max-width: 880px;
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

.category-hero {
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.2), transparent 24rem),
    radial-gradient(circle at 86% 20%, rgba(139, 92, 246, 0.18), transparent 22rem),
    linear-gradient(90deg, #020617, #0f172a);
}

.small-actions {
  margin-top: 24px;
}

.category-overview-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: 180px auto;
}

.category-overview-card > div:last-child {
  padding: 20px;
  display: grid;
  gap: 10px;
}

.category-overview-card h2 {
  margin: 0;
  font-size: 25px;
}

.category-overview-card span {
  color: var(--cyan);
  font-weight: 850;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 180px;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

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

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

.rank-number {
  color: var(--cyan);
  font-weight: 950;
  font-size: 24px;
  letter-spacing: -0.04em;
  text-align: center;
}

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

.rank-row b {
  color: #001018;
  background: var(--cyan);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #020617;
}

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

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.38)),
    linear-gradient(0deg, #020617, transparent 44%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 16px;
}

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

.detail-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-intro p {
  max-width: 780px;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 18px;
  margin: 0 0 22px;
}

.detail-tags {
  margin-top: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 18rem),
    rgba(2, 6, 23, 0.46);
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-ring {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #001018;
  background: var(--cyan);
  box-shadow: 0 0 44px rgba(34, 211, 238, 0.5);
  font-size: 32px;
  padding-left: 5px;
}

.player-overlay strong {
  font-size: clamp(22px, 4vw, 36px);
  max-width: 80%;
  text-align: center;
}

.player-overlay em {
  color: var(--soft);
  font-style: normal;
}

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

.content-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.content-card h2 {
  margin: 18px 0 14px;
  font-size: 28px;
}

.content-card p {
  position: relative;
  color: #d1d5db;
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.94);
  padding: 54px 0 22px;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 38px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  max-width: 460px;
}

.site-footer h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: var(--muted);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    height: 580px;
  }

  .hero-arrow {
    display: none;
  }

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

  .detail-poster {
    width: min(280px, 74vw);
  }

  .with-search {
    align-items: stretch;
    flex-direction: column;
  }
}

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

  .header-inner {
    height: 62px;
  }

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

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

  .hero {
    height: 540px;
  }

  .hero-copy {
    padding-top: 10px;
  }

  .hero p,
  .detail-intro p {
    font-size: 16px;
  }

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

  .section {
    padding: 44px 0;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

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

  .rank-row b {
    display: none;
  }

  .rank-row img {
    width: 56px;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .overview-grid,
  .movie-grid,
  .featured-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .filter-row button {
    width: 100%;
  }
}
