:root {
  --bg: #0a0a0a;
  --panel: rgba(23, 23, 23, 0.86);
  --panel-strong: #171717;
  --line: rgba(245, 158, 11, 0.16);
  --muted: #a3a3a3;
  --text: #f5f5f5;
  --soft: #d4d4d4;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-dark: #92400e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(146, 64, 14, 0.2), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 245, 245, 0.08);
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(22px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #111;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
  border-radius: 12px;
  color: #d4d4d4;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  padding: 10px 16px;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.desktop-nav a.is-active,
.mobile-nav a.is-active {
  color: #151515;
  background: var(--amber);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 10, 0.95);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 32px 0 46px;
}

.hero-shell {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(38, 38, 38, 0.96), rgba(10, 10, 10, 0.98));
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 30px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.98) 0%, rgba(10, 10, 10, 0.76) 50%, rgba(10, 10, 10, 0.34) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.05);
}

.hero-slide::after {
  position: absolute;
  inset: auto 8% -24% auto;
  width: 42%;
  height: 56%;
  content: "";
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  filter: blur(80px);
}

.hero-content,
.hero-poster-wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h2 {
  font-size: clamp(34px, 5.4vw, 64px);
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #e5e5e5;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.78;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.hero-meta span,
.movie-card-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #111;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover,
.btn-ghost:hover,
.rank-action:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster-wrap {
  justify-self: center;
  width: min(360px, 100%);
  transform: rotate(2deg);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 28px;
  background: linear-gradient(135deg, #2a2114, #121212);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

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

.hero-controls {
  position: absolute;
  right: 46px;
  bottom: 38px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button,
.slider-dot {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border-radius: 999px;
}

.hero-dots {
  position: absolute;
  left: 60px;
  bottom: 54px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

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

.section {
  padding: 44px 0;
}

.section-tight {
  padding-top: 18px;
}

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

.section-kicker {
  margin-bottom: 8px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 18px 0 28px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(23, 23, 23, 0.72);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.search-input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.06);
}

.filter-chips button.is-active {
  color: #151515;
  border-color: transparent;
  background: var(--amber);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(23, 23, 23, 0.76);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.movie-poster,
.rank-cover,
.related-card-image,
.detail-cover,
.player-cover,
.category-card,
.hero-poster {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(38, 38, 38, 0.96));
}

.movie-poster {
  display: block;
  overflow: hidden;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

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

.movie-card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-card-meta span,
.detail-meta span {
  padding: 5px 9px;
  color: #cfcfcf;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.related-card h3 a:hover {
  color: var(--amber-light);
}

.movie-card p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

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

.tag-row span {
  padding: 5px 9px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
}

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

.category-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.32), transparent 44%),
    rgba(23, 23, 23, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card strong {
  font-size: 24px;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-card span {
  color: var(--amber-light);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 88px 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(23, 23, 23, 0.76);
}

.rank-cover {
  overflow: hidden;
  border-radius: 18px;
}

.rank-cover img {
  width: 88px;
  height: 118px;
  object-fit: cover;
}

.rank-number {
  color: var(--amber-light);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

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

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-action {
  color: #111;
  background: var(--amber);
}

.detail-hero {
  padding: 42px 0 30px;
}

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

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

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

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

.detail-content h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-lead {
  margin: 22px 0;
  color: #e7e7e7;
  font-size: 18px;
  line-height: 1.82;
}

.player-panel {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-stage {
  position: relative;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  border: 0;
  color: #fff;
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(0, 0, 0, 0.66));
}

.player-cover span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  color: #111;
  background: var(--amber);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.3);
}

.player-cover.is-hidden {
  display: none;
}

.content-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background: rgba(23, 23, 23, 0.72);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 18px;
  color: #d8d8d8;
  font-size: 16px;
  line-height: 1.88;
}

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

.related-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(23, 23, 23, 0.78);
}

.related-card-image {
  overflow: hidden;
}

.related-card-image img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.related-card h3 {
  margin: 0;
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.search-empty {
  display: none;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(23, 23, 23, 0.72);
  text-align: center;
}

.search-empty.is-visible {
  display: block;
}

[data-card].is-hidden,
.image-missing {
  display: none !important;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.82);
}

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

.footer-logo {
  margin-bottom: 12px;
  color: var(--amber-light);
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

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

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

.footer-links a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.15);
}

.copyright {
  padding: 18px 0 30px;
  color: #737373;
  font-size: 13px;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-shell {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px 24px 96px;
  }

  .hero-poster-wrap {
    width: min(260px, 70vw);
    justify-self: start;
  }

  .hero-dots {
    left: 24px;
    bottom: 38px;
  }

  .hero-controls {
    right: 22px;
    bottom: 24px;
  }

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

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

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

  .rank-action {
    grid-column: 2 / 4;
  }

  .rank-cover img {
    width: 74px;
    height: 100px;
  }

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

  .detail-cover {
    max-width: 300px;
  }

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

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

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

  .hero-shell {
    border-radius: 24px;
  }

  .hero h1,
  .hero h2 {
    letter-spacing: -0.04em;
  }

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

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

  .content-panel {
    padding: 20px;
  }
}
