:root {
  --night-950: #0a1929;
  --night-925: #0d2136;
  --night-900: #102a43;
  --night-850: #183651;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-600: #486581;
  --night-500: #627d98;
  --night-400: #829ab1;
  --night-300: #9fb3c8;
  --night-200: #bcccdc;
  --night-100: #f0f4f8;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --red-500: #ef4444;
  --green-500: #22c55e;
  --shadow-night: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-amber: 0 0 24px rgba(245, 158, 11, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 32rem), var(--night-950);
  color: var(--night-100);
  font-family: Inter, 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 {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(10, 25, 41, 0.92);
  border-bottom: 1px solid rgba(51, 78, 104, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--night-950);
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: var(--shadow-amber);
}

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

.brand-copy strong,
.footer-brand {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--amber-400), var(--amber-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--night-400);
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--night-200);
  border-radius: 12px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--amber-400);
  background: rgba(36, 59, 83, 0.72);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--night-700);
  border-radius: 12px;
  background: rgba(36, 59, 83, 0.5);
  color: var(--night-100);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--night-100);
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--night-800);
  background: rgba(10, 25, 41, 0.98);
}

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

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

main {
  min-height: 72vh;
  padding-top: 72px;
}

.hero-carousel {
  position: relative;
  height: clamp(520px, 78vh, 820px);
  overflow: hidden;
  background: var(--night-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--night-950) 0%, rgba(10, 25, 41, 0.78) 35%, rgba(10, 25, 41, 0.18) 100%), linear-gradient(90deg, rgba(10, 25, 41, 0.95), transparent 62%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 0 0 72px;
}

.hero-copy {
  width: min(760px, 92vw);
  animation: fadeIn 600ms ease both;
}

.hero-tags,
.tag-row,
.filter-row,
.category-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.category-pill-row a,
.filter-row button {
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.13);
  color: var(--amber-400);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 12px;
  color: #fff;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.6);
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--night-200);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  color: var(--night-300);
}

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

.btn,
.hero-actions a,
.section-link,
.category-card .open-link,
.play-overlay button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary,
.hero-actions a:first-child,
.play-overlay button {
  color: var(--night-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: var(--shadow-amber);
}

.btn-soft,
.hero-actions a:last-child,
.section-link,
.category-card .open-link {
  color: var(--night-100);
  background: rgba(36, 59, 83, 0.72);
  border: 1px solid rgba(98, 125, 152, 0.4);
}

.btn:hover,
.hero-actions a:hover,
.section-link:hover,
.category-card .open-link:hover,
.play-overlay button:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(159, 179, 200, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
}

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

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(240, 244, 248, 0.42);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  padding: clamp(52px, 8vw, 86px) 0;
}

.section.alt {
  background: linear-gradient(180deg, var(--night-900), var(--night-950));
}

.section.deep {
  background: var(--night-900);
}

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

.section-head p,
.eyebrow {
  margin: 0 0 8px;
  color: var(--amber-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--night-100);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.page-title {
  padding: 54px 0 28px;
}

.page-title p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--night-300);
  font-size: 18px;
}

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

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

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

.movie-card,
.category-card,
.info-card,
.search-panel,
.player-panel,
.detail-card,
.list-card {
  background: rgba(16, 42, 67, 0.96);
  border: 1px solid rgba(51, 78, 104, 0.75);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: var(--shadow-night);
}

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--night-800), var(--night-900));
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.score-badge,
.rank-badge,
.list-rank {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  color: var(--night-950);
  background: var(--amber-500);
}

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(239, 68, 68, 0.9);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 7px;
  color: var(--night-100);
  font-size: 17px;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.card-body p {
  min-height: 45px;
  margin: 0 0 10px;
  color: var(--night-300);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--night-400);
  font-size: 12px;
}

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

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

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

.list-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.list-card:hover {
  border-color: rgba(245, 158, 11, 0.36);
  transform: translateX(4px);
}

.list-card img {
  width: 96px;
  height: 132px;
  object-fit: cover;
  border-radius: 12px;
}

.list-card h3 {
  margin: 5px 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.list-card p {
  margin: 0 0 12px;
  color: var(--night-300);
  font-size: 14px;
}

.list-rank {
  left: 8px;
  top: 8px;
  padding: 4px 8px;
  color: var(--night-950);
  background: var(--amber-500);
}

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

.category-card {
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(145deg, rgba(16, 42, 67, 0.98), rgba(36, 59, 83, 0.82));
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--night-300);
  font-size: 15px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

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

.search-panel {
  padding: 18px;
  margin: 18px 0 28px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--night-700);
  border-radius: 14px;
  outline: none;
  padding: 14px 16px;
  color: var(--night-100);
  background: rgba(10, 25, 41, 0.72);
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: var(--shadow-amber);
}

.filter-row {
  margin-top: 14px;
}

.filter-row button {
  background: rgba(36, 59, 83, 0.65);
  color: var(--night-200);
}

.filter-row button.active {
  color: var(--night-950);
  background: var(--amber-500);
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--night-400);
  font-size: 14px;
}

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

.player-panel {
  padding: 0;
  background: #000;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.26));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-overlay-inner {
  text-align: center;
}

.play-overlay button {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  font-size: 24px;
}

.play-overlay h2 {
  margin: 18px 0 0;
  color: #fff;
  font-size: 22px;
}

.player-error {
  display: none;
  padding: 16px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.78);
}

.player-error.visible {
  display: block;
}

.detail-card,
.info-card {
  padding: 24px;
}

.detail-title h1 {
  margin-top: 0;
}

.detail-title p {
  color: var(--night-300);
  font-size: 17px;
}

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

.info-card {
  padding: 15px;
  background: rgba(36, 59, 83, 0.45);
}

.info-card small {
  display: block;
  color: var(--night-400);
}

.info-card strong {
  display: block;
  margin-top: 4px;
  color: var(--night-100);
  font-size: 18px;
}

.article-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(51, 78, 104, 0.74);
}

.article-block h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.article-block p {
  margin: 0;
  color: var(--night-200);
}

.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.side-poster {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(51, 78, 104, 0.8);
  background: #071421;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.2fr;
  gap: 36px;
  padding: 42px 0;
}

.site-footer p,
.site-footer a {
  color: var(--night-400);
  font-size: 14px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--night-100);
  font-size: 16px;
}

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

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

.site-footer a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(36, 59, 83, 0.7);
  color: var(--night-500);
  text-align: center;
  font-size: 13px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .mobile-toggle {
    display: block;
  }

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

  .sidebar {
    position: static;
  }

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .header-inner {
    height: 64px;
  }

  main {
    padding-top: 64px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .hero-carousel {
    height: 620px;
  }

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

  .hero-control {
    top: auto;
    bottom: 24px;
    width: 42px;
    height: 42px;
  }

  .hero-prev {
    left: 16px;
  }

  .hero-next {
    right: 16px;
  }

  .hero-dots {
    bottom: 36px;
  }

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

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

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

  .card-body {
    padding: 12px;
  }

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

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

  .search-box {
    grid-template-columns: 1fr;
  }

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

  .list-card img {
    width: 78px;
    height: 110px;
  }

  .play-overlay button {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 430px) {
  .grid,
  .grid.six,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }
}
