:root {
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #64748b;
  --brand-a: #ef4444;
  --brand-b: #ec4899;
  --brand-c: #f97316;
  --purple: #7c3aed;
  --blue: #2563eb;
  --surface: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, 0.14), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.12), transparent 30rem),
    var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b), var(--brand-c));
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
  font-size: 15px;
  flex: 1;
}

.nav-link,
.main-nav a {
  padding: 8px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.main-nav a:hover,
.nav-link.active {
  color: #fef3c7;
  transform: translateY(-1px);
}

.nav-search {
  width: 260px;
}

.nav-search input,
.quick-search input {
  width: 100%;
  border: 0;
  outline: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 11px 16px;
  color: #111827;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  font-size: 22px;
  padding: 7px 11px;
}

.hero-carousel {
  position: relative;
  height: min(760px, calc(100vh - 68px));
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.1)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.05) 45%, rgba(15, 23, 42, 0.55));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  bottom: 86px;
  width: min(680px, calc(100% - 48px));
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}

.hero-content p,
.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  max-width: 720px;
}

.hero-tags,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(12px);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.mini-tags span {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #ec4899, #7c3aed);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.34);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px) scale(1.02);
}

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

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

.hero-dots button.active {
  background: #fff;
}

.quick-panel,
.section,
.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.slim-panel {
  grid-template-columns: 1fr;
  margin-top: 24px;
}

.quick-search {
  position: relative;
}

.quick-search span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.quick-search input {
  background: #f1f5f9;
  padding-left: 46px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.quick-links a {
  border-radius: 999px;
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.1);
  padding: 9px 14px;
  font-weight: 800;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.1);
  white-space: nowrap;
}

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

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

.movie-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scroll-snap-type: x proximity;
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #312e81);
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img,
.channel-cover:hover img {
  transform: scale(1.08);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 56%);
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 1;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 9px;
  backdrop-filter: blur(10px);
}

.duration {
  right: 10px;
  top: 10px;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: #7c3aed;
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.meta-row span,
.meta-row a {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 4px 8px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.04));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 66px;
  font-size: 22px;
  line-height: 1.2;
}

.category-tile em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

.gradient-section {
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(219, 234, 254, 0.76));
  box-shadow: var(--shadow);
  padding: 28px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.6), transparent 28rem),
    linear-gradient(135deg, #0f172a, #312e81 48%, #7f1d1d);
  box-shadow: var(--shadow);
  padding: clamp(38px, 7vw, 88px);
  overflow: hidden;
}

.compact-hero,
.channel-hero,
.rank-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

.channel-list {
  display: grid;
  gap: 20px;
}

.channel-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: stretch;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  padding: 16px;
}

.channel-cover {
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
}

.channel-cover img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.channel-card h2 {
  margin: 4px 0 10px;
  font-size: 28px;
}

.channel-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.channel-links a {
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a {
  color: #7c3aed;
}

.player-card,
.detail-article,
.side-box,
.side-poster {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.player-card {
  overflow: hidden;
  background: #000;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  z-index: 2;
}

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

.play-layer button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #7c3aed);
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(124, 58, 237, 0.45);
  cursor: pointer;
  padding-left: 6px;
}

.detail-article {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-article h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-article h2 {
  margin: 28px 0 10px;
  color: #111827;
  font-size: 24px;
}

.detail-article p {
  color: #475569;
  font-size: 17px;
}

.lead {
  color: #334155;
  font-size: 20px;
  font-weight: 700;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  border-radius: 16px;
  background: #f1f5f9;
  padding: 10px 12px;
  color: #475569;
  font-weight: 800;
}

.detail-tags span {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.1);
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-poster {
  overflow: hidden;
}

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

.side-box {
  padding: 20px;
}

.side-box h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  background: #f8fafc;
  padding: 11px 12px;
  font-weight: 800;
}

.side-links a:hover {
  color: #7c3aed;
  background: #f3e8ff;
}

.side-links em {
  color: var(--muted);
  font-style: normal;
}

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

.related-grid .card-body p,
.related-grid .mini-tags {
  display: none;
}

.related-grid .card-title {
  min-height: 44px;
  font-size: 15px;
}

.site-footer {
  margin-top: 70px;
  color: #fff;
  background: linear-gradient(90deg, #581c87, #1e3a8a, #312e81);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0 30px;
}

.footer-grid strong {
  display: block;
  margin-bottom: 12px;
  color: #fde68a;
  font-size: 18px;
}

.footer-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.78);
}

.footer-grid a:hover {
  color: #fff;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 18px 0 26px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

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

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

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

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

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

  .detail-side {
    position: static;
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 860px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav,
  .nav-search {
    display: none;
    width: 100%;
  }

  .site-header.menu-open .main-nav,
  .site-header.menu-open .nav-search {
    display: grid;
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
  }

  .hero-carousel {
    height: 620px;
    min-height: 620px;
  }

  .hero-content {
    bottom: 72px;
  }

  .quick-panel,
  .section-head,
  .detail-title-row,
  .footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .quick-links {
    justify-content: flex-start;
  }

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

  .channel-card {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    height: 640px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions a,
  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

  .movie-strip {
    grid-auto-columns: 82%;
  }

  .page-hero,
  .gradient-section,
  .detail-article {
    border-radius: 24px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}
