
:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --sky: #38bdf8;
  --blue: #2563eb;
  --yellow: #facc15;
  --radius: 1.1rem;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

body::selection {
  background: rgba(56, 189, 248, 0.3);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.28);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.24);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1.18rem;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  border-radius: 999px;
  padding: 10px 16px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
}

.menu-toggle span {
  height: 2px;
  border-radius: 99px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  display: block;
}

.hero-slider {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.62) 47%, rgba(2, 6, 23, 0.78)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 55%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-label,
.detail-label,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.2);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-content h1 {
  max-width: 780px;
  margin: 22px 0;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  color: var(--soft);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 0.82rem;
}

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

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

.primary-button {
  color: white;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.24);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.text-button {
  color: var(--sky);
  min-height: auto;
  padding: 0;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(10px);
  font-size: 2rem;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dots button {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 46px;
  background: white;
}

.quick-search-block {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  margin-top: -48px;
  position: relative;
  z-index: 10;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-block h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2,
.site-footer h2 {
  margin: 0;
}

.quick-search-block p,
.section-heading p,
.page-hero p,
.detail-line,
.detail-content p,
.site-footer p,
.category-overview p,
.category-tile p {
  color: var(--muted);
  line-height: 1.75;
}

.home-search,
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.5);
}

.home-search input,
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 8px;
}

.home-search button {
  border: 0;
  border-radius: 12px;
  min-height: 40px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  font-weight: 800;
}

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

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

.section-heading > span {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.section-heading div {
  flex: 1;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-heading a {
  color: var(--sky);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.movie-card:hover,
.compact-card:hover,
.rank-card:hover,
.category-overview:hover,
.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 24px 66px rgba(14, 165, 233, 0.12);
  background: rgba(15, 23, 42, 0.92);
}

.card-cover {
  position: relative;
  height: 260px;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.large-card .card-cover {
  height: 320px;
}

.card-cover img,
.compact-cover img,
.rank-cover img,
.detail-poster img,
.poster-collage img {
  transition: transform 0.45s ease;
}

.movie-card:hover .card-cover img,
.compact-card:hover .compact-cover img,
.rank-card:hover .rank-cover img,
.category-overview:hover .poster-collage img {
  transform: scale(1.08);
}

.play-chip,
.compact-cover span {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #020617;
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.74);
  font-size: 0.78rem;
}

.card-body {
  padding: 18px;
}

.card-body h2,
.compact-card h2,
.rank-card h2 {
  font-size: 1.03rem;
  line-height: 1.35;
  margin: 0 0 10px;
}

.card-body h2 a:hover,
.compact-card h2 a:hover,
.rank-card h2 a:hover {
  color: var(--sky);
}

.card-body p,
.compact-card p,
.rank-card p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.82rem;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #475569;
}

.ranking-strip {
  padding: 72px 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.72));
  border-block: 1px solid var(--line);
}

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

.compact-card,
.rank-card {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.compact-cover,
.rank-cover {
  position: relative;
  display: block;
  min-height: 110px;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

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

.category-tile,
.category-overview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.42));
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.category-tile strong,
.category-overview h2 {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.category-tile div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-tile div span {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.accent-red {
  --accent: #fb7185;
}

.accent-purple {
  --accent: #a78bfa;
}

.accent-emerald {
  --accent: #34d399;
}

.accent-blue,
.accent-sky,
.accent-cyan {
  --accent: #38bdf8;
}

.accent-orange,
.accent-amber {
  --accent: #f59e0b;
}

.accent-rose {
  --accent: #fb7185;
}

.accent-violet {
  --accent: #8b5cf6;
}

.category-tile,
.category-overview,
.category-hero {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 1px color-mix(in srgb, var(--accent, #38bdf8) 18%, transparent);
}

.page-main {
  padding-bottom: 72px;
}

.page-hero {
  margin-top: 36px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.5));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 16px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  font-size: 1.05rem;
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
}

.search-field span {
  color: var(--sky);
  padding-left: 8px;
}

.filter-panel select {
  min-height: 54px;
  color: white;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  outline: 0;
}

.list-section {
  padding-top: 34px;
}

.category-overview {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
}

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

.poster-collage img {
  height: 126px;
  border-radius: 12px;
  background: #0f172a;
}

.rank-list {
  padding-top: 34px;
}

.rank-card {
  grid-template-columns: 64px 132px 1fr;
  align-items: center;
}

.rank-number {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.detail-main {
  padding-top: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 22px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.14), transparent 28rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  min-height: 470px;
  border-radius: 22px;
  background: #0f172a;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-copy h1 {
  margin-top: 18px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 760px;
  font-size: 1.08rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 4px;
}

.detail-meta span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.1);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #020617;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.4);
  font-size: 2rem;
}

.player-shell.is-started .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

.detail-content article {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-content h2 {
  margin-bottom: 12px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

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

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

.site-footer ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--sky);
}

.footer-bottom {
  text-align: center;
  color: #64748b;
  border-top: 1px solid var(--line);
  padding: 18px;
}

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

@media (max-width: 1024px) {
  .cards-grid,
  .featured-grid,
  .compact-grid,
  .editor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-list,
  .rank-list,
  .category-grid,
  .category-overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: flex;
  }

  .brand-copy small {
    display: none;
  }

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 110px;
  }

  .hero-control {
    display: none;
  }

  .quick-search-block,
  .filter-panel,
  .footer-grid,
  .detail-hero,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .featured-grid,
  .compact-grid,
  .editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .ranking-list,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .compact-card,
  .rank-card {
    grid-template-columns: 112px 1fr;
  }

  .rank-card .rank-number {
    position: absolute;
    z-index: 2;
    margin: 8px;
  }

  .rank-card {
    position: relative;
  }

  .rank-card .rank-cover {
    grid-column: 1;
  }

  .rank-card .rank-copy {
    grid-column: 2;
  }

  .card-cover {
    height: 220px;
  }

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

  .detail-poster {
    min-height: 420px;
  }
}

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

  .cards-grid,
  .featured-grid,
  .compact-grid,
  .editor-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .card-cover {
    height: 300px;
  }

  .compact-card,
  .rank-card {
    grid-template-columns: 96px 1fr;
  }

  .compact-cover,
  .rank-cover {
    min-height: 132px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
