:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(96, 165, 250, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --orange: #f97316;
  --green: #22c55e;
  --radius: 1.2rem;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.18),
      transparent 32rem
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(6, 182, 212, 0.12),
      transparent 28rem
    ),
    linear-gradient(180deg, #020617 0%, #0f172a 55%, #020617 100%);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.96),
    rgba(30, 64, 175, 0.96),
    rgba(15, 23, 42, 0.96)
  );
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.header-main,
.category-strip-inner,
.hero-content,
.section-wrap,
.page-wrap,
.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #60a5fa, #06b6d4);
  color: white;
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.28);
}

.brand-text,
.footer-brand span:last-child {
  font-size: 1.2rem;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 0.96rem;
}

.desktop-nav a,
.category-strip a,
.mobile-panel a {
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.desktop-nav a:hover,
.category-strip a:hover,
.mobile-panel a:hover {
  color: #67e8f9;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.74);
  color: var(--text);
  outline: none;
  border-radius: 999px;
  padding: 10px 16px;
}

.header-search input {
  width: 240px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.text-link {
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.header-search button,
.mobile-search button,
.primary-btn {
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.22);
}

.secondary-btn {
  padding: 10px 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.62);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(15, 23, 42, 0.65);
  color: white;
}

.mobile-panel {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.category-strip {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.32);
  overflow-x: auto;
}

.category-strip-inner {
  display: flex;
  gap: 18px;
  padding: 9px 0;
}

.category-strip a {
  white-space: nowrap;
  color: #cbd5e1;
  font-size: 0.9rem;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.95) 0%,
      rgba(15, 23, 42, 0.72) 43%,
      rgba(2, 6, 23, 0.36) 100%
    ),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 54px;
  align-items: end;
  padding: 0 0 74px;
}

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

.eyebrow,
.category-count {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(37, 99, 235, 0.98),
    rgba(6, 182, 212, 0.96)
  );
  color: white;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 7px 14px;
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 18px 0 16px;
  color: white;
  font-size: clamp(2.35rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1.12rem;
}

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

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 5px 10px;
}

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

.hero-poster {
  align-self: end;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: white;
  font-size: 1.7rem;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-2px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: white;
}

.section-wrap,
.page-wrap {
  padding: 58px 0;
}

.section-stack {
  display: grid;
  gap: 68px;
}

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

.section-head h2,
.content-panel h2,
.detail-related h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

.score-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  border-radius: 999px;
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
}

.score-pill {
  right: 10px;
  top: 10px;
  background: linear-gradient(90deg, #f97316, #facc15);
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.card-body {
  padding: 16px;
}

.card-tags {
  margin-bottom: 10px;
}

.card-body h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body p {
  min-height: 3.05em;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 0.84rem;
}

.horizontal-scroll {
  overflow-x: auto;
  padding-bottom: 14px;
}

.horizontal-track {
  display: flex;
  gap: 18px;
  min-width: max-content;
}

.horizontal-track .movie-card {
  width: 320px;
}

.wide-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
}

.wide-card .card-poster img {
  height: 100%;
  min-height: 186px;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.28),
    rgba(8, 47, 73, 0.22)
  );
  box-shadow: var(--shadow);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 14px 0;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.category-card-body {
  padding: 18px;
}

.category-card h2 {
  margin: 12px 0 8px;
  font-size: 1.35rem;
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  color: #67e8f9;
  font-weight: 800;
}

.rank-section {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.26),
    rgba(6, 182, 212, 0.14)
  );
  padding: 26px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 78px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
  padding: 12px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.ranking-item:hover {
  background: rgba(15, 23, 42, 0.92);
  transform: translateX(4px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-thumb img {
  width: 78px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.rank-score {
  justify-self: end;
  color: #fde68a;
  font-size: 1.3rem;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(96, 165, 250, 0.16);
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(8, 47, 73, 0.2)),
    rgba(2, 6, 23, 0.84);
}

.page-hero .page-wrap {
  padding: 76px 0 60px;
}

.page-hero h1 {
  max-width: 860px;
}

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

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.filter-input-wrap {
  flex: 1;
}

.filter-panel input {
  width: 100%;
  border-radius: 18px;
  padding: 12px 16px;
}

.filter-panel select {
  min-width: 150px;
  border-radius: 18px;
}

.empty-state {
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 30px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  object-fit: contain;
  background: black;
}

.player-cover {
  border: 0;
  padding: 0;
  cursor: pointer;
  color: white;
  background: #020617;
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.18));
}

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

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.32);
  transform: translate(-50%, -50%);
  font-size: 2rem;
}

.detail-info {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
  padding: 28px;
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.detail-info .lead {
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: 1.05rem;
}

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

.meta-list li {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.34);
  padding: 10px 12px;
  color: var(--muted);
}

.meta-list strong {
  color: white;
}

.content-panel,
.detail-related {
  margin-top: 34px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  padding: 28px;
}

.content-panel p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 1.02rem;
}

.detail-related .movie-grid {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
  border-top: 1px solid rgba(96, 165, 250, 0.16);
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.62),
    rgba(2, 6, 23, 0.98)
  );
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 44px 0;
}

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

.site-footer p {
  max-width: 480px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 1rem;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 16px;
  color: var(--muted-2);
  text-align: center;
}

@media (max-width: 1040px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

  .hero-poster {
    display: none;
  }

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

@media (max-width: 760px) {
  .header-main,
  .category-strip-inner,
  .hero-content,
  .section-wrap,
  .page-wrap,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 62px;
  }

  .hero-control {
    display: none;
  }

  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ranking-item {
    grid-template-columns: 42px 60px minmax(0, 1fr);
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .rank-thumb img {
    width: 60px;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
    font-size: 1rem;
  }

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

@media (max-width: 480px) {
  .brand-text {
    font-size: 1rem;
  }

  .hero h1,
  .hero h2,
  .page-hero h1 {
    font-size: 2.15rem;
  }

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

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

  .wide-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}
