:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --amber: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner,
.section-inner,
.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 14px;
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.08));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.18);
}

.brand-text {
  overflow: hidden;
  max-width: 260px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

.mobile-nav a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-overlay,
.detail-bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.32)),
    linear-gradient(0deg, #020617 0%, transparent 42%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 340px;
  gap: 48px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 18px 0;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(16px, 2.2vw, 20px);
}

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

.tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.primary-btn,
.secondary-btn,
.text-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  border: 1px solid rgba(34, 211, 238, 0.55);
  color: #001018;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

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

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

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow);
}

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

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

.hero-dot {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

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

.search-band {
  position: relative;
  z-index: 6;
  margin-top: -44px;
}

.search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-inner h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 8px 0 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.search-inner h2,
.section-heading h2 {
  font-size: clamp(26px, 3.6vw, 40px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box span {
  color: var(--cyan);
  font-weight: 900;
}

.section-block {
  padding: 72px 0 0;
}

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

.compact-heading {
  align-items: center;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(15, 23, 42, 0.94);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-shade,
.tile-shade {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.play-mini {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #001018;
  background: var(--cyan);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  background: var(--amber);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

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

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  margin: 0 0 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #b6c2d2;
  font-size: 14px;
}

.card-meta,
.detail-meta-grid,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta-grid span {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  padding: 4px 9px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 18px;
}

.category-tile strong {
  margin-top: 88px;
  font-size: 22px;
}

.category-tile small {
  color: #cbd5e1;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.46);
}

.ranking-item:hover {
  border-color: rgba(34, 211, 238, 0.38);
}

.ranking-number {
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
}

.ranking-item img {
  width: 54px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-text {
  min-width: 0;
}

.ranking-text strong,
.ranking-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-text small {
  color: var(--muted);
}

.ranking-score {
  color: var(--cyan);
  font-weight: 900;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
}

.small-hero .section-inner {
  padding: 72px 0 46px;
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 72px);
}

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

.wide-search {
  max-width: 720px;
  margin-top: 24px;
}

.filter-row {
  margin-top: 18px;
}

.filter-row button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
}

.filter-row button.active,
.filter-row button:hover {
  border-color: rgba(34, 211, 238, 0.48);
  color: var(--cyan);
}

.category-overview-grid {
  display: grid;
  gap: 20px;
  padding: 52px 0 0;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.category-cover img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.5), transparent);
}

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

.category-overview-card p {
  margin: 0 0 14px;
  color: #cbd5e1;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.sample-links a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #020617;
}

.detail-head {
  position: relative;
  z-index: 2;
  padding: 38px 0 70px;
}

.breadcrumb {
  margin-bottom: 28px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(40px, 7vw, 76px);
}

.one-line {
  max-width: 850px;
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 20px;
}

.detail-meta-grid {
  margin: 18px 0 26px;
  font-size: 14px;
}

.player-section {
  margin-top: -58px;
  position: relative;
  z-index: 5;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #001018;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.54));
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 24px 52px rgba(34, 211, 238, 0.3);
  font-size: 34px;
  font-weight: 900;
}

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

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

.content-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.content-card h2 {
  margin-bottom: 16px;
  font-size: 30px;
}

.content-card p {
  margin: 0 0 14px;
  color: #cbd5e1;
}

.site-footer {
  margin-top: 82px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #020617);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.5fr) minmax(220px, 1fr);
  gap: 28px;
  padding: 42px 0;
}

.footer-brand .brand-text {
  font-size: 20px;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  color: #cbd5e1;
}

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

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

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
}

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

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
  }

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

  .split-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-poster {
    width: min(260px, 72vw);
  }

  .search-inner {
    grid-template-columns: 1fr;
  }

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

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

  .category-overview-card,
  .detail-layout,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-cover img {
    height: 220px;
  }

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

  .detail-hero {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section-inner,
  .footer-inner,
  .copyright,
  .mobile-nav {
    width: min(100% - 22px, 1240px);
  }

  .brand-text {
    max-width: 190px;
    font-size: 20px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-copy h1,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.05em;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
