:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-solid: #1e293b;
  --panel-soft: rgba(15, 23, 42, 0.74);
  --border: rgba(148, 163, 184, 0.18);
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 35rem),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.92);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #0f172a;
  background: var(--amber);
  box-shadow: 0 12px 34px rgba(251, 191, 36, 0.24);
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
}

.nav-link {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  padding: 6px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
}

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

.top-search input::placeholder,
.mobile-search input::placeholder,
.list-search input::placeholder {
  color: #64748b;
}

.top-search button,
.mobile-search button,
.list-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #0f172a;
  background: var(--amber);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 12px;
  color: #fff;
  background: rgba(30, 41, 59, 0.72);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(51, 65, 85, 0.82);
  padding: 14px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel nav {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.mobile-link {
  padding: 12px 4px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
}

.page-offset {
  padding-top: 64px;
}

.hero-spotlight {
  position: relative;
  height: 560px;
  min-height: 500px;
  overflow: hidden;
  background: #0f172a;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.7s ease;
}

.hero-spotlight:hover .hero-image {
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.08) 100%),
    linear-gradient(to right, rgba(15, 23, 42, 0.78), transparent 60%);
}

.hero-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.hero-content-inner {
  max-width: 760px;
}

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-weight: 700;
}

.hero-content h1 {
  max-width: 860px;
  margin: 16px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-actions,
.section-head,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #0f172a;
  background: var(--amber);
}

.btn-primary:hover,
.top-search button:hover,
.mobile-search button:hover,
.list-search button:hover {
  background: #fcd34d;
}

.btn-ghost,
.btn-soft {
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.62);
}

.btn-soft {
  min-height: 38px;
  padding: 0 14px;
  color: var(--amber);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover {
  transform: translateY(-1px);
}

.main-stack {
  padding: 58px 0 76px;
  display: grid;
  gap: 70px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-head h2,
.page-title h1,
.detail-section h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  display: block;
  color: inherit;
}

.poster-thumb,
.square-thumb,
.rail-card figure,
.wide-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #1e293b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.poster-thumb {
  aspect-ratio: 3 / 4;
  margin: 0 0 12px;
}

.poster-thumb img,
.square-thumb img,
.rail-card img,
.wide-thumb img,
.rank-item img,
.detail-poster img,
.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-card:hover .poster-thumb img,
.square-card:hover .square-thumb img,
.rail-card:hover img,
.wide-card:hover img,
.rank-item:hover img,
.category-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-thumb::after,
.square-thumb::after,
.rail-card figure::after,
.wide-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.1), transparent);
  transition: opacity 0.3s ease;
}

.poster-card:hover .poster-thumb::after,
.rail-card:hover figure::after,
.wide-card:hover .wide-thumb::after {
  opacity: 1;
}

.poster-thumb figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: translateY(14px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.poster-card:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.poster-card h3,
.rail-card h3,
.wide-card h3,
.rank-item h3,
.related-card h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.poster-card p,
.rail-card p,
.wide-card p,
.rank-item p,
.detail-meta,
.breadcrumbs,
.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.poster-card:hover h3,
.rail-card:hover h3,
.wide-card:hover h3,
.rank-item:hover h3,
.related-card:hover h3 {
  color: var(--amber);
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 0 18px;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.rail-card {
  flex: 0 0 290px;
}

.rail-card figure {
  aspect-ratio: 16 / 9;
  margin: 0 0 12px;
}

.play-dot {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 48px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rail-card:hover .play-dot {
  opacity: 1;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  transition: background 0.2s ease, transform 0.2s ease;
}

.wide-card:hover {
  background: rgba(30, 41, 59, 0.96);
  transform: translateY(-2px);
}

.wide-thumb {
  height: 100%;
  min-height: 220px;
  border-radius: 0;
}

.wide-copy {
  padding: 22px;
}

.wide-copy p {
  margin: 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 8px;
  color: #94a3b8;
  background: rgba(51, 65, 85, 0.7);
  font-size: 12px;
}

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

.square-thumb {
  aspect-ratio: 1 / 1;
}

.square-thumb::after {
  opacity: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent 72%);
}

.square-thumb span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.55);
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.92);
}

.rank-num {
  color: var(--amber);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 78px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
}

.page-hero {
  padding: 128px 0 46px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.82);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 24rem);
}

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

.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 26px;
}

.list-search {
  display: flex;
  width: min(520px, 100%);
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
}

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-preview {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  opacity: 0.5;
}

.category-preview img {
  min-height: 130px;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.45));
}

.category-card-content {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 20px;
  left: 20px;
}

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

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

.watch-panel,
.detail-card,
.detail-section {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.58);
  box-shadow: var(--shadow);
}

.watch-panel {
  overflow: hidden;
}

.watch-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.watch-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.watch-start.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.watch-start span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: var(--amber);
  box-shadow: 0 18px 50px rgba(251, 191, 36, 0.3);
  font-size: 30px;
  transform: translateX(2px);
}

.watch-copy {
  padding: 22px;
}

.watch-copy h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.detail-card {
  overflow: hidden;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  margin: 0;
  background: #1e293b;
}

.detail-side {
  padding: 20px;
}

.detail-side dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-side div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  color: var(--soft);
  font-size: 14px;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
}

.detail-section {
  padding: 24px;
}

.detail-section + .detail-section {
  margin-top: 18px;
}

.detail-section h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: #cbd5e1;
}

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

.related-card figure {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin: 0 0 10px;
  border-radius: 14px;
  background: #1e293b;
}

.related-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 62%);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.breadcrumbs a {
  color: var(--amber);
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.52);
}

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

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.92);
  background: rgba(2, 6, 23, 0.55);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 36px 0;
}

.footer-brand {
  margin-bottom: 12px;
}

.footer-grid p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(30, 41, 59, 0.82);
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

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

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

@media (max-width: 780px) {
  .hero-spotlight {
    height: 500px;
  }

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

  .main-stack {
    gap: 52px;
  }

  .grid-posters,
  .category-mini-grid,
  .category-grid,
  .feature-grid,
  .rank-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .wide-thumb {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .list-tools {
    align-items: stretch;
    flex-direction: column;
  }

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

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

@media (max-width: 520px) {
  .container,
  .nav-shell,
  .page-title,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .grid-posters,
  .category-mini-grid,
  .category-grid,
  .rank-grid,
  .related-grid {
    gap: 14px;
  }

  .rail-card {
    flex-basis: 250px;
  }

  .rank-item {
    grid-template-columns: 38px 64px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-num {
    font-size: 20px;
  }

  .rank-item img {
    width: 64px;
    height: 86px;
  }

  .watch-copy,
  .detail-section,
  .detail-side {
    padding: 18px;
  }
}
