:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-deep: #111827;
  --muted: #94a3b8;
  --text: #ffffff;
  --soft-text: rgba(255, 255, 255, 0.84);
  --line: rgba(148, 163, 184, 0.18);
  --primary: #0ea5e9;
  --primary-deep: #0284c7;
  --primary-soft: rgba(14, 165, 233, 0.18);
  --accent: #f59e0b;
  --accent-deep: #92400e;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
}

.brand-text,
.footer-brand {
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.42rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.88);
}

.nav-links a,
.mobile-panel a,
.footer-links a {
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: #38bdf8;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(30, 41, 59, 0.9);
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.88);
}

.mobile-panel a:hover {
  background: rgba(30, 41, 59, 0.78);
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.84) 45%, rgba(15, 23, 42, 0.20) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-inner {
  min-height: 70vh;
  display: grid;
  align-items: center;
  padding: 72px 0;
}

.hero-content {
  width: min(720px, 100%);
  position: relative;
  z-index: 1;
}

.hero-badge,
.section-kicker,
.meta-pill,
.tag,
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
}

.hero-badge {
  padding: 8px 16px;
  background: rgba(2, 132, 199, 0.92);
  color: #fff;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.28);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-lead {
  width: min(660px, 100%);
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
}

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

.meta-pill {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: #fff;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.26);
}

.btn-primary:hover {
  box-shadow: 0 22px 46px rgba(14, 165, 233, 0.34);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.28);
}

.btn-ghost:hover {
  border-color: rgba(56, 189, 248, 0.64);
  background: rgba(30, 41, 59, 0.82);
}

.search-band {
  position: relative;
  z-index: 3;
  margin-top: -48px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel input,
.search-panel select,
.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.74);
  color: #fff;
  padding: 0 16px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus,
.search-input:focus {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

section {
  position: relative;
}

.section {
  padding: 78px 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.48);
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.14;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-kicker {
  padding: 7px 12px;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-weight: 800;
  margin-bottom: 12px;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.40);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.74);
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.08) brightness(0.90);
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.score {
  top: 10px;
  right: 10px;
  min-width: 42px;
  height: 28px;
  background: rgba(245, 158, 11, 0.95);
  color: #111827;
  font-size: 0.86rem;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 32px;
  height: 32px;
  background: rgba(2, 132, 199, 0.94);
  color: #fff;
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.92);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

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

.card-body {
  padding: 14px;
}

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

.card-body h3 a:hover {
  color: #38bdf8;
}

.card-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.card-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.65;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.22));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
  transition: transform 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.07);
}

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

.category-card span {
  font-size: 1.28rem;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.page-hero {
  padding: 68px 0 42px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(245, 158, 11, 0.05), transparent);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--soft-text);
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  margin: 0 0 28px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

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

.filter-pill {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.74);
  color: rgba(255, 255, 255, 0.82);
  padding: 0 14px;
  cursor: pointer;
}

.filter-pill.is-active,
.filter-pill:hover {
  background: rgba(2, 132, 199, 0.94);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.70);
}

.detail-hero {
  padding: 58px 0 44px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.78));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumbs a:hover {
  color: #38bdf8;
}

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

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.72);
}

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

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy .lead {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
  line-height: 1.85;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.tag {
  padding: 7px 12px;
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.20);
  font-size: 0.9rem;
}

.content-box {
  padding: 30px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.content-box h2 {
  margin: 0 0 16px;
  font-size: 1.58rem;
}

.content-box p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
  margin: 0;
}

.content-box + .content-box {
  margin-top: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.36);
  font-size: 1.8rem;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.ranking-index {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  font-weight: 900;
}

.ranking-row img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h3 {
  margin: 0 0 6px;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ranking-score {
  color: #fbbf24;
  font-weight: 900;
}

.site-footer {
  margin-top: 48px;
  padding: 46px 0 0;
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  color: #fff;
  font-size: 1.05rem;
  margin: 0 0 14px;
}

.site-footer p {
  margin: 12px 0 0;
  line-height: 1.8;
}

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

.footer-bottom {
  margin-top: 36px;
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

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

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

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .hero-inner {
    min-height: 68vh;
  }

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

  .section-head {
    display: block;
  }

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

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

  .detail-poster {
    width: min(320px, 100%);
  }

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

  .ranking-row {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .ranking-score {
    grid-column: 3;
  }
}

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

  .hero-inner {
    padding: 54px 0;
  }

  .hero::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
  }

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

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

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

  .content-box {
    padding: 20px;
  }

  .ranking-row {
    grid-template-columns: 38px 62px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-row img {
    width: 62px;
    height: 88px;
  }
}
