:root {
  --night-950: #0a1929;
  --night-900: #102a43;
  --night-850: #132f4c;
  --night-800: #1f3a56;
  --night-700: #334e68;
  --night-500: #829ab1;
  --night-300: #bcccdc;
  --night-100: #f0f4f8;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--night-950);
  color: var(--night-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(10, 25, 41, 0.92);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(188, 204, 220, 0.12);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.28);
}

.header-inner {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--night-950);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 14px;
  font-size: 18px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 22px;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff7ed, #f59e0b);
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 800;
}

.brand-text small {
  display: block;
  color: var(--night-300);
  font-size: 12px;
  margin-top: -2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 9px 12px;
  color: var(--night-300);
  font-size: 15px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: var(--amber);
}

.header-search {
  width: min(300px, 28vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(188, 204, 220, 0.14);
  border-radius: 16px;
  background: rgba(16, 42, 67, 0.62);
}

.header-search input,
.search-box input,
.filter-strip input,
.filter-strip select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.header-search input::placeholder,
.search-box input::placeholder,
.filter-strip input::placeholder {
  color: rgba(188, 204, 220, 0.68);
}

.header-search button,
.search-box button {
  border: 0;
  color: var(--night-950);
  background: var(--amber);
  border-radius: 12px;
  padding: 8px 13px;
  font-weight: 700;
  white-space: nowrap;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(188, 204, 220, 0.18);
  color: #fff;
  background: rgba(16, 42, 67, 0.72);
  border-radius: 14px;
}

.mobile-panel {
  display: none;
  padding: 16px 18px 22px;
  border-top: 1px solid rgba(188, 204, 220, 0.12);
  background: rgba(10, 25, 41, 0.98);
  backdrop-filter: blur(18px);
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--night-200, #d9e2ec);
  background: rgba(255, 255, 255, 0.05);
}

.hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  background: #050d16;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 28%, rgba(245, 158, 11, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(10, 25, 41, 0.96) 0%, rgba(10, 25, 41, 0.74) 48%, rgba(10, 25, 41, 0.18) 100%),
    linear-gradient(0deg, var(--night-950) 0%, transparent 32%);
}

.hero-content {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 105px;
  padding-top: 120px;
}

.hero-copy {
  width: min(760px, 100%);
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #ffd997;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.65);
}

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

.hero-meta,
.detail-meta,
.card-meta {
  margin: 18px 0;
  color: var(--night-300);
}

.hero-actions,
.section-title,
.filter-strip,
.detail-hero-inner,
.footer-grid {
  display: flex;
  align-items: center;
  gap: 18px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: var(--night-950);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 16px 44px rgba(245, 158, 11, 0.32);
}

.ghost-button,
.section-more {
  color: #fff;
  border: 1px solid rgba(188, 204, 220, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  font-size: 36px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  margin-top: -34px;
  padding: 28px;
  position: relative;
  z-index: 8;
  border: 1px solid rgba(188, 204, 220, 0.14);
  border-radius: var(--radius);
  background: rgba(16, 42, 67, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 9px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-search h2,
.section-title h2,
.page-hero h1,
.detail-copy h1,
.story-card h2,
.info-card h2,
.site-footer h2 {
  margin: 0;
  line-height: 1.14;
}

.home-search h2,
.section-title h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.home-search p,
.page-hero p,
.category-tile small,
.category-card p,
.story-card p,
.info-card dd,
.site-footer p {
  color: var(--night-300);
}

.search-box,
.filter-strip {
  border: 1px solid rgba(188, 204, 220, 0.14);
  border-radius: 18px;
  background: rgba(10, 25, 41, 0.66);
}

.search-box {
  display: flex;
  gap: 8px;
  padding: 9px;
}

.search-box input {
  padding: 0 12px;
}

.section-block {
  padding: 72px 0 0;
}

.section-title {
  justify-content: space-between;
  margin-bottom: 26px;
}

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

.category-tile,
.category-card,
.movie-card,
.story-card,
.info-card,
.player-shell {
  border: 1px solid rgba(188, 204, 220, 0.14);
  background: linear-gradient(180deg, rgba(31, 58, 86, 0.74), rgba(16, 42, 67, 0.42));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.category-tile {
  min-height: 144px;
  padding: 20px;
  border-radius: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.category-tile:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #102a43, #1f3a56);
}

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

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--night-950);
  background: var(--amber);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--night-950);
  background: var(--amber);
}

.card-body {
  padding: 14px;
}

.card-meta {
  margin: 0 0 8px;
  gap: 8px;
  color: var(--night-500);
  font-size: 12px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--amber);
}

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

.card-body .tag-row {
  gap: 6px;
}

.card-body .tag-row span {
  padding: 4px 7px;
  font-size: 11px;
}

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

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

.movie-card.compact .card-body p,
.movie-card.compact .tag-row {
  display: none;
}

.page-main {
  padding-top: 78px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 20%, rgba(245, 158, 11, 0.16), transparent 28%),
    linear-gradient(135deg, #102a43, #0a1929 70%);
}

.compact-hero {
  padding: 86px 0 54px;
}

.page-hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  letter-spacing: -0.04em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--night-300);
  font-size: 14px;
}

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

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

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--night-800);
}

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

.filter-strip {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  padding: 12px;
  margin-bottom: 26px;
}

.filter-strip.large {
  grid-template-columns: 1fr 180px 200px;
}

.filter-strip input,
.filter-strip select {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(188, 204, 220, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.filter-strip select option {
  color: #0a1929;
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 660px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #050d16;
  padding-top: 110px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) brightness(0.42);
  transform: scale(1.08);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 20%, rgba(245, 158, 11, 0.2), transparent 28%),
    linear-gradient(0deg, var(--night-950) 0%, rgba(10, 25, 41, 0.5) 72%, rgba(10, 25, 41, 0.92) 100%);
}

.detail-hero-inner {
  position: relative;
  align-items: flex-end;
  padding: 58px 0 64px;
}

.detail-poster {
  width: min(310px, 32vw);
  flex: 0 0 auto;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--night-800);
}

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

.detail-copy {
  max-width: 780px;
}

.detail-copy h1 {
  margin: 20px 0 12px;
  font-size: clamp(42px, 7vw, 76px);
  letter-spacing: -0.05em;
}

.detail-line {
  margin: 0;
  color: var(--night-300);
  font-size: 20px;
}

.detail-tags {
  margin: 18px 0 24px;
}

.player-section {
  margin-top: -12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--night-950);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48));
}

.player-start.hidden {
  display: none;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 56px rgba(245, 158, 11, 0.35);
  font-size: 32px;
}

.player-error {
  display: none;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff;
  background: rgba(127, 29, 29, 0.92);
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr 330px;
  gap: 20px;
  padding-top: 42px;
}

.story-card,
.info-card {
  padding: 24px;
  border-radius: var(--radius);
}

.story-card p {
  margin: 14px 0 0;
  font-size: 16px;
}

.info-card dl,
.info-card div {
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(188, 204, 220, 0.12);
}

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

.info-card dd a:hover {
  color: var(--amber);
}

.site-footer {
  margin-top: 86px;
  padding: 48px 0;
  border-top: 1px solid rgba(188, 204, 220, 0.12);
  background: rgba(5, 13, 22, 0.55);
}

.footer-grid {
  align-items: flex-start;
  justify-content: space-between;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
}

.footer-links {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  color: var(--night-300);
}

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

[data-movie-card].hidden {
  display: none;
}

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

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

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

  .info-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: 68px;
  }

  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

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

  .hero-arrow {
    display: none;
  }

  .home-search,
  .category-card,
  .detail-hero-inner,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .filter-strip,
  .filter-strip.large {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: auto;
    padding-top: 88px;
  }

  .detail-hero-inner {
    align-items: flex-start;
    padding-bottom: 42px;
  }

  .detail-poster {
    width: 220px;
  }
}

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

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

  .brand-icon {
    width: 38px;
    height: 38px;
  }

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

  .hero h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }

  .hero-actions,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card.compact {
    grid-template-columns: 78px 1fr;
  }

  .card-body {
    padding: 10px;
  }

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

  .card-body p,
  .card-body .tag-row {
    display: none;
  }

  .detail-poster {
    width: 170px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
  }
}
