:root {
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --accent: #2563eb;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --footer: #111827;
  --radius: 24px;
  --shadow: 0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #f8fbff 100%);
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(229 231 235 / 0.85);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand span {
  font-size: 22px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 34px;
  height: 34px;
  fill: var(--primary);
}

.brand-icon path {
  fill: #ffffff;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-size: 15px;
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: #ecfeff;
}

.top-search {
  margin-left: auto;
  width: min(360px, 34vw);
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.04);
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  padding: 10px 14px 10px 18px;
  color: var(--ink);
}

.top-search button {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 700;
  transition: background 180ms ease;
}

.top-search button:hover {
  background: var(--primary-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #111827;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-nav .nav-link {
  display: block;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.88) 0%, rgb(0 0 0 / 0.55) 42%, rgb(0 0 0 / 0.10) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 0 0 72px;
  color: #ffffff;
}

.hero-copy {
  width: min(680px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
}

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

.btn-primary,
.btn-secondary,
.btn-dark,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 18px 32px rgb(8 145 178 / 0.24);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  color: #ffffff;
  background: rgb(255 255 255 / 0.18);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgb(255 255 255 / 0.28);
}

.btn-dark {
  color: #ffffff;
  background: #111827;
}

.btn-light {
  color: var(--primary-dark);
  background: #ffffff;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #ffffff;
  background: rgb(255 255 255 / 0.20);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  transition: background 180ms ease;
}

.hero-control:hover {
  background: rgb(255 255 255 / 0.32);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.54);
  transition: width 220ms ease, background 220ms ease;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

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

.section-block {
  margin-bottom: 84px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 800;
}

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

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

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

.movie-card {
  display: block;
  min-width: 0;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #e5e7eb;
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.10);
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.movie-card-wide .poster-frame {
  aspect-ratio: 21 / 9;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.22), transparent);
  transition: opacity 250ms ease;
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: rgb(255 255 255 / 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 250ms ease, transform 250ms ease;
}

.card-category,
.card-duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  background: rgb(0 0 0 / 0.70);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 750;
}

.card-category {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.card-duration {
  right: 12px;
  top: 12px;
  padding: 6px 8px;
  border-radius: 8px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
}

.card-body {
  display: block;
  padding: 13px 2px 0;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: #111827;
  font-size: 17px;
  line-height: 1.32;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 180ms ease;
}

.card-meta,
.card-stats {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-stats {
  color: #4b5563;
}

.movie-card:hover .poster-frame {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

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

.movie-card:hover .poster-shade,
.movie-card:hover .play-circle {
  opacity: 1;
}

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

.movie-card:hover strong {
  color: var(--primary);
}

.gradient-section {
  margin-inline: -24px;
  padding: 48px 24px;
  border-radius: 32px;
  background: linear-gradient(90deg, #ecfeff, #eff6ff);
}

.dark-section {
  margin-inline: -24px;
  padding: 48px 24px;
  border-radius: 32px;
  color: #ffffff;
  background: #111827;
}

.dark-section .section-head h2,
.dark-section .card-body strong {
  color: #ffffff;
}

.dark-section .section-head p,
.dark-section .card-meta,
.dark-section .card-stats {
  color: #d1d5db;
}

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

.category-card {
  display: flex;
  min-height: 220px;
  padding: 26px;
  border: 1px solid rgb(8 145 178 / 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
  box-shadow: 0 12px 24px rgb(15 23 42 / 0.06);
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
}

.category-card span {
  margin-top: 26px;
  color: var(--primary);
  font-weight: 800;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.page-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  width: min(760px, 100%);
  margin: 0;
  color: #cffafe;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgb(15 23 42 / 0.05);
}

.filter-search input,
.filter-selects select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #ffffff;
  color: #111827;
}

.filter-search input {
  padding: 13px 16px;
}

.filter-selects {
  display: flex;
  gap: 12px;
  align-items: end;
}

.filter-selects label {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.filter-selects select {
  min-width: 132px;
  padding: 12px 12px;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 24px;
  color: #4b5563;
  background: #f3f4f6;
  text-align: center;
  font-weight: 700;
}

.no-results.show {
  display: block;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 750;
}

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

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.18));
}

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

.player-start {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: rgb(255 255 255 / 0.95);
  font-size: 28px;
  box-shadow: 0 20px 45px rgb(0 0 0 / 0.28);
}

.player-title-line {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 22px;
  color: #ffffff;
}

.player-title-line strong {
  display: block;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.2;
}

.player-title-line span {
  display: block;
  margin-top: 8px;
  color: #e5e7eb;
}

.detail-title {
  margin: 24px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: #4b5563;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 750;
}

.detail-meta .cyan-pill {
  color: var(--primary-dark);
  background: #cffafe;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.content-card {
  margin-bottom: 20px;
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgb(15 23 42 / 0.06);
}

.content-card.tint {
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 14px;
  color: #374151;
  line-height: 1.86;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.side-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 22px;
}

.side-card {
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgb(15 23 42 / 0.06);
}

.side-card h2,
.side-card h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.side-item {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.side-thumb {
  flex: 0 0 132px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
}

.side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.side-info {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.side-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 180ms ease;
}

.side-info em {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.side-item:hover img {
  transform: scale(1.08);
}

.side-item:hover strong {
  color: var(--primary);
}

.related-section {
  margin-top: 60px;
}

.site-footer {
  color: #d1d5db;
  background: var(--footer);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 36px;
}

.footer-logo span {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  color: #d1d5db;
  line-height: 1.8;
}

.footer-block h3 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 16px;
}

.footer-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-block a {
  color: #d1d5db;
  transition: color 180ms ease;
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgb(255 255 255 / 0.10);
  color: #9ca3af;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

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

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .main-wrap,
  .page-hero-inner,
  .detail-wrap,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .brand span {
    font-size: 19px;
  }

  .hero-content {
    width: min(100% - 24px, 1280px);
    padding-bottom: 70px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .main-wrap {
    padding: 42px 0;
  }

  .section-block {
    margin-bottom: 56px;
  }

  .section-head {
    display: grid;
  }

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

  .gradient-section,
  .dark-section {
    margin-inline: 0;
    padding: 28px 16px;
    border-radius: 24px;
  }

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

  .side-thumb {
    flex-basis: 110px;
  }

  .player-title-line {
    display: none;
  }
}
