:root {
  --bg: #050913;
  --bg-soft: #0b1220;
  --bg-card: rgba(15, 23, 42, 0.78);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --pink: #f472b6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at 15% 10%,
      rgba(34, 211, 238, 0.16),
      transparent 30rem
    ),
    radial-gradient(
      circle at 85% 0%,
      rgba(59, 130, 246, 0.18),
      transparent 36rem
    ),
    linear-gradient(180deg, #020617 0%, #07111f 42%, #050913 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
}

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

.brand-text strong {
  font-size: 19px;
  letter-spacing: 0.02em;
}

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

.desktop-nav,
.header-actions,
.hero-actions,
.detail-meta,
.filter-bar,
.card-meta,
.hero-tags,
.mini-tags,
.footer-links {
  display: flex;
  align-items: center;
}

.desktop-nav {
  gap: 6px;
}

.nav-link {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(34, 211, 238, 0.12);
}

.header-actions {
  gap: 12px;
}

.global-search {
  position: relative;
  width: min(300px, 28vw);
}

.global-search-input,
.movie-search-local {
  width: 100%;
  border: 1px solid var(--border);
  color: white;
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  padding: 12px 16px;
  transition: 0.2s ease;
}

.global-search-input:focus,
.movie-search-local:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 86vw);
  max-height: 440px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}

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

.search-item {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.search-item:hover {
  background: rgba(34, 211, 238, 0.1);
}

.search-item strong,
.search-item span {
  display: block;
}

.search-item span,
.empty-result {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.empty-result {
  padding: 16px;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: white;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  gap: 8px;
  flex-wrap: wrap;
}

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

.mobile-link {
  padding: 10px 14px;
  color: #dbeafe;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
}

.hero-slider {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.95) 0%,
      rgba(2, 6, 23, 0.76) 48%,
      rgba(2, 6, 23, 0.28) 100%
    ),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-overlay,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 18% 22%,
      rgba(34, 211, 238, 0.28),
      transparent 24rem
    ),
    linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 48px;
  align-items: center;
  padding: 72px;
}

.hero-copy {
  max-width: 710px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(42px, 7vw, 86px);
}

.hero-copy p,
.page-hero p,
.lead-text {
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
  margin: 22px 0 0;
}

.hero-tags,
.mini-tags,
.detail-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.mini-tags span,
.detail-meta span,
.card-meta span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #dbeafe;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  font-size: 14px;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.primary-btn,
.soft-btn,
.text-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: 0.22s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 22px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(59, 130, 246, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(34, 211, 238, 0.34);
}

.soft-btn,
.ghost-link {
  min-height: 44px;
  padding: 0 18px;
  color: #e0f2fe;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.68);
}

.soft-btn:hover,
.ghost-link:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.13);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 70px;
  border: 1px solid var(--border);
  color: white;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
  cursor: pointer;
}

.hero-dot.active {
  width: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.54);
}

.hero-thumb img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}

.hero-thumb span {
  color: #e2e8f0;
  font-weight: 700;
  line-height: 1.35;
}

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

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

.section-head h2,
.article-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.text-link {
  color: var(--cyan);
  font-weight: 800;
}

.text-link:hover {
  color: white;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--bg-card);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.quality-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.quality-pill {
  right: 12px;
  padding: 6px 10px;
  background: rgba(34, 211, 238, 0.9);
}

.rank-badge {
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.card-meta {
  gap: 8px;
  flex-wrap: wrap;
}

.card-meta span {
  padding: 5px 8px;
  font-size: 12px;
}

.movie-card h3 {
  margin: 14px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

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

.movie-card p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  font-size: 14px;
}

.mini-tags span {
  padding: 4px 8px;
  font-size: 12px;
}

.glass-panel {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: var(--shadow);
}

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

.category-tile {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.06)),
    rgba(15, 23, 42, 0.7);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.46);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

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

.category-tile strong {
  color: var(--cyan);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 58px;
}

.compact-hero,
.category-hero {
  background:
    radial-gradient(
      circle at top right,
      rgba(34, 211, 238, 0.18),
      transparent 22rem
    ),
    rgba(15, 23, 42, 0.72);
}

.page-hero h1,
.detail-info h1 {
  font-size: clamp(38px, 5vw, 66px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 22px;
}

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

.filter-bar {
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filter-bar .movie-search-local {
  max-width: 520px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-cover {
  overflow: hidden;
  width: 86px;
  height: 116px;
  border-radius: 16px;
  background: #0f172a;
}

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

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

.detail-hero {
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-shell {
  position: relative;
  z-index: 2;
  padding: 44px;
}

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

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.player-section {
  scroll-margin-top: 96px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: white;
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(
      circle at center,
      rgba(34, 211, 238, 0.22),
      transparent 18rem
    ),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.24s ease;
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 38px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.32);
}

.play-cover strong {
  font-size: 22px;
}

.player-intro {
  color: #dbeafe;
  line-height: 1.8;
  margin: 18px 0 0;
}

.article-section {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.62);
}

.article-section h2 + p,
.article-section p + p {
  margin-top: 16px;
}

.article-section p {
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.9;
}

.movie-card-compact .movie-card-body {
  padding: 14px;
}

.movie-card-compact h3 {
  font-size: 16px;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 84px auto 32px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.54);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
}

.footer-grid p {
  max-width: 620px;
  line-height: 1.7;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

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

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

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

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

  .hero-content {
    grid-template-columns: 1fr;
    padding: 58px;
  }

  .hero-poster {
    display: none;
  }

  .hero-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .desktop-nav,
  .global-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-stage {
    min-height: 560px;
    border-radius: 26px;
  }

  .hero-content,
  .page-hero,
  .detail-shell {
    padding: 28px;
  }

  .hero-arrow {
    display: none;
  }

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

  .section-head,
  .filter-bar,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .rank-row {
    grid-template-columns: 42px 74px 1fr;
  }

  .rank-row .ghost-link {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .hero-slider,
  .section-shell,
  .page-hero,
  .detail-hero,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .brand-text small {
    display: none;
  }

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

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .hero-stage {
    min-height: 620px;
  }

  .glass-panel,
  .article-section,
  .site-footer {
    padding: 22px;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-cover {
    display: none;
  }

  .rank-row .ghost-link {
    grid-column: 1 / -1;
  }
}
