:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  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.16), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.16), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 22px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 14px 28px rgba(34, 211, 238, 0.25);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 8px 10px;
}

.nav-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.mobile-panel.open {
  display: grid;
  gap: 14px;
}

.hero-carousel {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  min-height: 650px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-stage {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 380px;
  gap: 36px;
  align-items: center;
  padding: 74px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 46%, rgba(2, 6, 23, 0.18) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.18);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, #020617 0%, transparent 100%);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-copy,
.hero-media {
  position: relative;
  z-index: 2;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 10px 0 18px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.08em;
  font-weight: 950;
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-text {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.detail-tags,
.tag-list,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags a,
.tag-list span,
.filter-chips button,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: #dffbff;
  background: rgba(8, 145, 178, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.hero-actions,
.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn,
.ghost-link,
.section-more,
.intro-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.24);
}

.secondary-btn,
.ghost-link,
.section-more,
.intro-links a {
  padding: 12px 20px;
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-link:hover,
.section-more:hover,
.intro-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.6);
}

.hero-media {
  justify-self: end;
  width: 340px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.12));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.54);
  transform: rotate(2deg);
}

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

.hero-bottom {
  position: absolute;
  z-index: 4;
  left: 64px;
  right: 64px;
  bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 8px;
  width: min(560px, 100%);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-page-form input,
.inline-filter input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 12px 16px;
}

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

.hero-dots button {
  width: 42px;
  height: 10px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.36);
}

.hero-dots button.active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.content-section,
.page-main,
.detail-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 54px 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 24px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.62));
}

.intro-copy h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 8px 0 0;
  font-weight: 950;
  letter-spacing: -0.05em;
  color: #fff;
}

.intro-copy h2,
.section-head h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.intro-copy p:last-child,
.page-hero p,
.category-card-large p,
.detail-line,
.detail-content p {
  color: #cbd5e1;
  line-height: 1.85;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 24px 60px rgba(34, 211, 238, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.14));
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.07);
  filter: saturate(1.12);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 56%);
}

.play-mark {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 28px rgba(14, 165, 233, 0.3);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  font-weight: 950;
  background: linear-gradient(135deg, #fde68a, var(--gold));
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-line {
  min-height: 44px;
  margin: 0 0 12px;
  color: #b6c3d4;
  font-size: 13px;
  line-height: 1.65;
}

.tag-list span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 11px;
}

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

.category-tile,
.category-card-large {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.54));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.category-tile {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 950;
  color: #fff;
}

.category-tile small {
  color: #b6c3d4;
  line-height: 1.6;
}

.rank-section {
  padding-bottom: 80px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 82px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-num {
  font-size: 26px;
  font-weight: 950;
  color: var(--cyan);
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #fff;
}

.rank-info p {
  margin: 0 0 8px;
  color: #b6c3d4;
  line-height: 1.6;
}

.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.page-main {
  padding-top: 28px;
}

.page-hero {
  padding: 64px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.52)),
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 26rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1;
}

.page-hero p {
  max-width: 780px;
  font-size: 17px;
}

.inline-filter {
  width: min(640px, 100%);
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
}

.filter-chips {
  margin-top: 14px;
}

.filter-chips button {
  cursor: pointer;
}

.category-list-large {
  display: grid;
  gap: 18px;
  margin: 34px 0 80px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-cover-strip img {
  aspect-ratio: 2 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.category-card-large h2 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: clamp(24px, 4vw, 36px);
}

.detail-main {
  padding-top: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #94a3b8;
  margin-bottom: 18px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.5));
  box-shadow: var(--shadow);
}

.detail-cover {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.06);
}

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

.detail-info h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
}

.detail-line {
  font-size: 18px;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-player {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

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

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.62));
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 36px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 24px 60px rgba(34, 211, 238, 0.34);
}

.detail-player.is-playing .play-overlay {
  display: none;
}

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

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.detail-content h2 {
  font-size: 28px;
}

.detail-related {
  padding-bottom: 90px;
}

.search-page-form {
  margin-top: 28px;
}

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

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

.footer-links a {
  color: #cbd5e1;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

.footer-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.5);
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: #64748b;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr 280px;
    padding: 54px;
  }

  .hero-media {
    width: 260px;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-carousel,
  .hero-stage {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 34px 24px 120px;
  }

  .hero-media {
    width: min(230px, 58vw);
    justify-self: start;
    order: -1;
  }

  .hero-bottom {
    left: 22px;
    right: 22px;
    bottom: 24px;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search,
  .search-page-form {
    border-radius: 22px;
    flex-direction: column;
  }

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

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

  .intro-panel,
  .section-head,
  .footer-grid,
  .detail-content,
  .detail-hero,
  .category-card-large {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
  }

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

  .rank-row .ghost-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .page-hero {
    padding: 36px 24px;
  }

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

@media (max-width: 540px) {
  .nav-shell,
  .content-section,
  .page-main,
  .detail-main,
  .hero-carousel,
  .footer-grid,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 22px, 1200px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

  .card-line {
    min-height: auto;
  }

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

  .detail-hero {
    padding: 22px;
  }
}
