:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --soft: #cbd5e1;
  --brand: #34d399;
  --brand-2: #22d3ee;
  --brand-3: #10b981;
  --gold: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #00140d;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 32px rgba(52, 211, 153, 0.22);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.top-search {
  position: relative;
  width: min(290px, 28vw);
}

.top-search input,
.library-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
  padding: 11px 16px 11px 42px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input:focus,
.library-search input:focus {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

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

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
  padding: 14px 22px 22px;
}

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

.mobile-links {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  border-bottom: 1px solid var(--line);
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 40%, rgba(2, 6, 23, 0.76) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.72fr);
  align-items: center;
  gap: 42px;
  padding-top: 76px;
  padding-bottom: 78px;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.34);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.gradient-text {
  background: linear-gradient(90deg, #f8fafc, #a7f3d0 55%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc,
.page-hero p,
.detail-title p {
  margin: 22px 0 0;
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #00140d;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 40px rgba(52, 211, 153, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.25);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-poster {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
}

.hero-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.08));
}

.hero-card-body h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.hero-card-body p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(226, 232, 240, 0.38);
}

.hero-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section {
  padding: 72px 0;
}

.section-soft {
  background: rgba(15, 23, 42, 0.38);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

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

.text-link {
  color: #67e8f9;
  font-weight: 750;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.48);
  box-shadow: 0 24px 64px rgba(16, 185, 129, 0.13);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.68);
}

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

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #00140d;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.movie-card-body {
  padding: 15px;
}

.movie-card h3 {
  min-height: 48px;
  margin: 9px 0 8px;
  font-size: 16px;
  line-height: 1.5;
}

.movie-card h3 a:hover {
  color: var(--brand);
}

.movie-card p {
  margin: 0;
  min-height: 64px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.65;
}

.badges,
.meta-row,
.meta-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 999px;
  padding: 4px 9px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.28);
  font-size: 12px;
  line-height: 1;
}

.badge-muted {
  color: #bae6fd;
  border-color: rgba(34, 211, 238, 0.22);
  background: rgba(8, 47, 73, 0.26);
}

.meta-row {
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 42%),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.48);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #00140d;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.65;
}

.category-count {
  display: inline-flex;
  margin-top: 18px;
  color: #67e8f9;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.75);
}

.rank-no {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #00140d;
  background: linear-gradient(135deg, var(--gold), var(--brand));
  font-weight: 950;
}

.rank-poster {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.55;
}

.page-hero {
  padding: 76px 0 46px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 40%),
    rgba(15, 23, 42, 0.28);
}

.toolbar {
  position: sticky;
  top: 72px;
  z-index: 20;
  padding: 18px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(16px);
}

.toolbar-inner {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 16px;
  align-items: center;
}

.library-search {
  position: relative;
}

.filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-btn {
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 10px 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.filter-btn.is-active,
.filter-btn:hover {
  color: #00140d;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.no-results {
  display: none;
  margin-top: 28px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.78);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

.detail-hero {
  padding: 58px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(52, 211, 153, 0.12), transparent 38%),
    rgba(15, 23, 42, 0.28);
}

.breadcrumb {
  margin-bottom: 26px;
  color: #94a3b8;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

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

.meta-pills {
  margin-top: 18px;
}

.meta-pill {
  display: inline-flex;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  font-size: 14px;
}

.player-section {
  padding: 58px 0 24px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #00140d;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

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

.play-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.38);
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
  padding: 36px 0 78px;
}

.content-card,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

.content-card {
  padding: 28px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 104px;
  padding: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: rgba(52, 211, 153, 0.08);
}

.related-item img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.45;
}

.related-item p {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #94a3b8;
}

.footer-brand {
  color: #a7f3d0;
  font-weight: 900;
}

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

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

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

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

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

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

  .hero-card {
    max-width: 360px;
  }

  .detail-poster {
    max-width: 310px;
  }

  .side-card {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner {
    padding: 13px 16px;
  }

  .container {
    padding: 0 16px;
  }

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 42px;
    padding-bottom: 84px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .hero-desc,
  .page-hero p,
  .detail-title p {
    font-size: 16px;
  }

  .section {
    padding: 54px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

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

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .rank-poster {
    width: 60px;
    height: 80px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    display: none;
  }

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