:root {
  color-scheme: dark;
  --bg-deep: #020617;
  --bg-main: #0f172a;
  --bg-soft: #111827;
  --bg-card: #1e293b;
  --bg-card-2: #0f172a;
  --text-main: #ffffff;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-2: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 25px 50px -18px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 20px;
}

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

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 32vw);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
}

.top-search input,
.hero-search input,
.filter-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.top-search input::placeholder,
.hero-search input::placeholder,
.filter-box input::placeholder {
  color: #64748b;
}

.top-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: var(--amber);
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #fff;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--bg-main);
}

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

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

.hero-bg,
.detail-hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, #020617 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--amber);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25);
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
  max-width: 780px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-hero p {
  max-width: 720px;
  color: var(--text-soft);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.genre-row,
.tag-row,
.detail-meta-pills,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.genre-row span,
.tag-row span,
.detail-meta-pills span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--amber);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
  background: var(--amber-2);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.72);
}

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  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.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.stats-band {
  border-block: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 26px 0;
}

.stats-grid div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}

.stats-grid strong {
  color: #fde68a;
  font-size: 30px;
}

.stats-grid span {
  color: var(--text-muted);
}

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

.section-muted {
  background: rgba(15, 23, 42, 0.46);
}

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

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

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

.section-more {
  flex-shrink: 0;
  color: #fde68a;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 22px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.movie-cover {
  position: relative;
  display: block;
  height: 270px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #334155);
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent 45%);
  opacity: 0.76;
}

.card-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(239, 68, 68, 0.92);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(245, 158, 11, 0.95);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 25px;
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.35);
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #64748b;
  font-size: 12px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.35);
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 154px;
}

.movie-card-horizontal .movie-cover {
  height: 100%;
  min-height: 154px;
}

.movie-card-horizontal .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr);
  gap: 24px;
}

.featured-main .movie-cover {
  height: 430px;
}

.featured-main .movie-card h3 {
  font-size: 28px;
}

.featured-side {
  display: grid;
  gap: 16px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111827;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18));
}

.category-tile:hover img {
  opacity: 0.58;
  transform: scale(1.08);
}

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  width: fit-content;
  margin-top: 8px;
  color: #fde68a;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.rail-wrap {
  position: relative;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 4px 18px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 286px;
}

.rail-btn {
  position: absolute;
  top: 40%;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  cursor: pointer;
  font-size: 28px;
}

.rail-left {
  left: -10px;
}

.rail-right {
  right: -10px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.sticky-toolbar {
  position: sticky;
  top: 92px;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
}

.filter-box span,
.filter-count {
  flex-shrink: 0;
  color: #fde68a;
  font-size: 13px;
  font-weight: 800;
}

.page-main {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 74px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(135deg, #020617, #111827 52%, #0f172a);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.overview-stack {
  display: grid;
  gap: 34px;
}

.category-overview-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

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

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.category-overview-head p {
  margin: 0;
  color: var(--text-muted);
}

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

.ranking-list,
.related-list {
  display: grid;
  gap: 16px;
}

.ranking-list .movie-card-horizontal {
  grid-template-columns: 210px 1fr;
}

.detail-hero {
  min-height: 520px;
  padding: 0;
}

.detail-hero-bg,
.detail-hero-mask {
  position: absolute;
  inset: 0;
}

.detail-hero-bg {
  opacity: 0.52;
  filter: saturate(1.12);
}

.detail-hero-mask {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.35)),
    linear-gradient(0deg, #020617 0%, transparent 50%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-meta-pills {
  margin-top: 22px;
}

.detail-content-section {
  padding-top: 32px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 340px;
  gap: 28px;
}

.detail-primary,
.detail-sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
}

.player-card,
.detail-article,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.player-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  color: #fff;
  background: var(--amber);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 25px 55px rgba(245, 158, 11, 0.35);
  transform: translate(-50%, -50%);
}

.player-start span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.player-box.is-playing .player-start {
  display: none;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.48);
  font-size: 13px;
}

.detail-article {
  padding: 28px;
}

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

.detail-article p {
  margin: 0 0 26px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.9;
}

.side-card {
  padding: 20px;
}

.poster-card img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 16px;
}

.poster-card .btn {
  width: 100%;
}

.info-list {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.info-list dt {
  color: #64748b;
}

.info-list dd {
  margin: 0;
  color: var(--text-soft);
}

.info-list a {
  color: #fde68a;
}

.tag-cloud a:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

.hero-search {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 26px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
}

.hero-search input {
  padding: 0 14px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: #fde68a;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: var(--text-muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 12px;
}

.site-footer a {
  display: block;
}

.site-footer a:hover {
  color: #fbbf24;
}

.is-hidden {
  display: none !important;
}

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

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

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

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

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

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
  }

  .main-nav.is-open {
    display: flex;
  }

  .top-search {
    order: 4;
    width: 100%;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .movie-card-horizontal,
  .ranking-list .movie-card-horizontal {
    grid-template-columns: 140px 1fr;
  }

  .movie-card-horizontal .movie-cover {
    min-height: 170px;
  }

  .toolbar,
  .category-overview-head,
  .section-head,
  .hero-search {
    align-items: stretch;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero-slider,
  .detail-hero,
  .detail-hero-content {
    min-height: 520px;
    height: 520px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-hero h1 {
    font-size: 36px;
  }

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

  .movie-cover {
    height: 250px;
  }

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

  .movie-card-horizontal .movie-cover {
    height: 230px;
  }

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

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