* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #020617;
  color: #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  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;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.nav-shell {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 32px rgba(6, 182, 212, 0.28);
}

.brand-name {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  position: relative;
  padding: 8px 2px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #22d3ee;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
}

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

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  border-top: 1px solid rgba(34, 211, 238, 0.14);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.58);
}

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

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 40px));
  margin: 80px auto 0;
}

.hero-content h1,
.page-hero h1 {
  margin: 12px 0 18px;
  max-width: 880px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p,
.page-hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(17px, 2.6vw, 24px);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.detail-tags span,
.pill {
  padding: 7px 12px;
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.24);
}

.btn.ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(14px);
}

.btn.full {
  width: 100%;
  border-radius: 14px;
}

.hero-glow {
  position: absolute;
  right: -8%;
  top: 14%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.02) 70%);
  filter: blur(4px);
}

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

.hero-dot {
  width: 36px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.hero-dot.active {
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 0;
}

.page-section {
  padding-top: 54px;
}

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

.section-head h2 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.section-head a {
  color: #67e8f9;
  font-weight: 700;
}

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

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

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

.movie-card,
.category-card,
.category-overview-card,
.rank-item,
.detail-card,
.side-panel,
.cover-card,
.search-panel,
.filter-panel {
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.24);
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 24px 60px rgba(8, 145, 178, 0.18);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #67e8f9;
}

.card-body p {
  min-height: 50px;
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 14px;
}

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

.card-meta span,
.rank-copy span,
.detail-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.16);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card,
.category-overview-card {
  border-radius: 22px;
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.55);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.24), rgba(30, 41, 59, 0.9));
}

.category-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.12);
}

.category-card h3,
.category-overview-card h2 {
  margin: 0 0 10px;
  color: #ffffff;
}

.category-card p,
.category-overview-card p,
.category-card small,
.category-overview-card small {
  color: #94a3b8;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.compact-head {
  margin-bottom: 22px;
}

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

.compact-card {
  display: grid;
  gap: 8px;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 13px;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
  transition: transform 0.25s ease;
}

.compact-card span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-panel,
.aside-panel {
  border-radius: 22px;
  padding: 24px;
}

.side-panel h2,
.aside-panel h2 {
  margin: 0 0 18px;
  color: #ffffff;
}

.mini-rank,
.compact-stack {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.5);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-weight: 900;
}

.rank-item img {
  width: 88px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-copy h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 16px;
}

.rank-copy p {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 13px;
}

.rank-copy div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-main,
.detail-main {
  min-height: 100vh;
  padding-top: 64px;
  background: linear-gradient(180deg, #020617, #0f172a 44%, #020617);
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 76px max(20px, calc((100vw - 1180px) / 2)) 56px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(34, 211, 238, 0.16);
}

.page-hero.small-hero {
  min-height: 300px;
  background: radial-gradient(circle at 18% 20%, rgba(6, 182, 212, 0.22), transparent 32%), linear-gradient(135deg, #020617, #0f172a 52%, #082f49);
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-strip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
  transition: transform 0.25s ease;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 26px;
  padding: 16px;
  border-radius: 20px;
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #67e8f9;
  font-size: 20px;
}

.search-box input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.88);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-panel select {
  padding: 0 14px;
}

.search-box input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.76);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.result-count,
.search-status {
  color: #94a3b8;
  font-weight: 700;
}

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

.search-section {
  padding-bottom: 40px;
}

.search-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 22px;
  margin-bottom: 22px;
}

.large-search input {
  min-height: 58px;
  font-size: 18px;
}

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

.tag-filter button {
  border: 1px solid rgba(34, 211, 238, 0.18);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.88);
  border-radius: 999px;
  padding: 8px 13px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tag-filter button.active,
.tag-filter button:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(6, 182, 212, 0.25);
}

.search-status {
  margin: 0 0 18px;
}

.detail-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: #94a3b8;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.56));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 5px;
  font-size: 34px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 46px rgba(6, 182, 212, 0.36);
}

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

.detail-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.detail-card h2 {
  margin: 28px 0 10px;
  color: #ffffff;
  font-size: 24px;
}

.detail-card p {
  color: #cbd5e1;
  font-size: 17px;
}

.detail-card .lead-text {
  margin-top: 22px;
  color: #e2e8f0;
  font-size: 19px;
}

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

.detail-aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 20px;
}

.cover-card {
  padding: 16px;
  border-radius: 24px;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
  background: #0f172a;
}

.compact-stack .compact-card {
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
}

.compact-stack .compact-card img {
  width: 68px;
  height: 88px;
}

.detail-related {
  padding-bottom: 40px;
}

.site-footer {
  margin-top: 80px;
  padding: 46px 20px 24px;
  background: #0f172a;
  border-top: 1px solid rgba(34, 211, 238, 0.18);
}

.footer-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid a {
  display: block;
  margin: 7px 0;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, 100%);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .split-section,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: relative;
    top: auto;
    grid-template-columns: 260px minmax(0, 1fr);
  }

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

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-top: 64px;
  }

  .hero-tags {
    gap: 8px;
  }

  .section,
  .detail-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 48px;
  }

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

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-item img {
    width: 76px;
    height: 58px;
  }

  .page-hero {
    min-height: 300px;
    padding: 54px 16px 44px;
  }

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

  .detail-card,
  .side-panel,
  .aside-panel,
  .cover-card,
  .search-panel {
    padding: 18px;
    border-radius: 20px;
  }
}
