:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: #1e293b;
  --line-light: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

* {
  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 34rem),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.2));
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
body.menu-open .site-header {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #082f49;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.4);
  font-size: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.brand-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  margin-top: 3px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--muted-strong);
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a {
  padding: 10px 14px;
  font-size: 14px;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

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

.mobile-nav a {
  display: block;
  padding: 12px 14px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #000;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0.68) 44%, rgba(2, 6, 23, 0.08) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.22));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  max-width: 1180px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2.2vw, 20px);
  margin: 0 0 22px;
}

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

.hero-meta span,
.card-meta span,
.detail-meta span {
  color: var(--muted-strong);
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line-light);
}

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

.tag-row span {
  color: #a5f3fc;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--cyan-soft);
}

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

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #082f49;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  padding: 13px 22px;
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line-light);
  padding: 12px 20px;
  backdrop-filter: blur(12px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: var(--cyan);
}

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

.page-shell {
  padding: 54px 0 72px;
}

.page-top {
  padding-top: 86px;
}

.home-search-wrap {
  position: relative;
  z-index: 3;
  margin-top: -44px;
}

.home-search-card,
.filter-panel,
.page-hero,
.content-section,
.category-overview-card,
.detail-content,
.info-card {
  border: 1px solid var(--line-light);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.home-search-card {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.8fr;
  gap: 22px;
  align-items: center;
}

.home-search-card h2,
.section-head h2,
.page-hero h1,
.category-overview-head h2,
.detail-content h1 {
  margin: 6px 0 0;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.home-search-card h2 {
  font-size: clamp(22px, 3vw, 34px);
}

.filter-panel {
  padding: 18px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 170px 170px;
  gap: 14px;
}

.search-box,
.select-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.55);
  padding: 0 14px;
}

.search-box input:focus,
.select-box select:focus {
  border-color: rgba(34, 211, 238, 0.68);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.11);
}

.content-section {
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 34px;
}

.content-section:nth-child(2n) {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.72));
}

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

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

.section-more {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  padding: 10px 14px;
  white-space: nowrap;
}

.movie-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 20px 52px rgba(2, 6, 23, 0.34);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-glow {
  opacity: 1;
}

.rank-mark {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #082f49;
  background: var(--cyan);
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.32);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--cyan);
}

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

.card-meta {
  gap: 6px;
  margin-bottom: 10px;
}

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

.movie-card-small .tag-row,
.movie-card-mini .tag-row {
  display: none;
}

.movie-card-rank {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.movie-card-rank .poster-link {
  aspect-ratio: 2 / 3;
}

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

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

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

.category-card {
  min-height: 210px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line-light);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.48));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #082f49;
  background: var(--cyan);
  font-weight: 900;
}

.category-card strong {
  display: block;
  margin-top: 14px;
  font-size: 19px;
}

.category-card p,
.page-hero p,
.category-overview-head p {
  color: var(--muted);
  margin: 9px 0 0;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.category-samples span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-strong);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.page-hero {
  border-radius: 28px;
  padding: 46px;
  margin-bottom: 30px;
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.64), rgba(15, 23, 42, 0.86)),
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 24rem);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

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

.compact-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  border-radius: 26px;
  padding: 24px;
}

.category-overview-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.detail-shell {
  padding: 34px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 22px;
}

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

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

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: #082f49;
  background: var(--cyan);
  font-size: 28px;
  box-shadow: 0 0 0 16px rgba(34, 211, 238, 0.14), 0 24px 60px rgba(0, 0, 0, 0.3);
}

.detail-content {
  margin-top: 24px;
  border-radius: 26px;
  padding: 30px;
}

.detail-content h1 {
  font-size: clamp(30px, 5vw, 52px);
}

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

.detail-content section {
  margin-top: 28px;
}

.detail-content h2,
.info-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-content p {
  color: var(--muted-strong);
  margin: 0;
}

.lead-text {
  font-size: 18px;
  color: #e2e8f0;
}

.detail-aside {
  position: sticky;
  top: 96px;
}

.info-card {
  border-radius: 24px;
  padding: 24px;
}

.info-card dl {
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-light);
}

.info-card div:last-child {
  border-bottom: 0;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.related-section {
  margin-top: 34px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 12px;
}

.footer-links a {
  color: var(--muted-strong);
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

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

  .home-search-card,
  .filter-panel,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .movie-grid-featured,
  .movie-grid-normal,
  .ranking-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-aside {
    position: static;
  }

  .footer-links {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-text strong {
    font-size: 17px;
  }

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

  .hero-content {
    bottom: 88px;
  }

  .hero-arrow {
    top: auto;
    bottom: 26px;
    width: 42px;
    height: 42px;
  }

  .hero-prev {
    left: 16px;
  }

  .hero-next {
    right: 16px;
  }

  .hero-dots {
    bottom: 40px;
  }

  .home-search-card,
  .content-section,
  .category-overview-card,
  .detail-content,
  .info-card,
  .page-hero {
    padding: 20px;
    border-radius: 22px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-head,
  .category-overview-head {
    align-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .movie-grid-featured,
  .movie-grid-normal,
  .movie-grid-small,
  .movie-grid-mini,
  .ranking-list,
  .ranking-page-list,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-card-rank {
    grid-template-columns: 92px 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p {
    font-size: 13px;
  }

  .play-bubble {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }
}

@media (max-width: 440px) {
  .movie-grid-featured,
  .movie-grid-normal,
  .movie-grid-small,
  .movie-grid-mini,
  .ranking-list,
  .ranking-page-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-rank {
    grid-template-columns: 104px 1fr;
  }
}
