:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #d97706;
  --secondary: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--secondary);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #f0f9ff 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #38bdf8 45%, var(--accent));
  box-shadow: 0 12px 25px rgba(2, 132, 199, 0.26);
}

.brand-text {
  font-size: 22px;
}

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

.nav-link,
.mobile-nav-link {
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: var(--shadow);
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

.hero-slider {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.36)), linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.05) 48%, rgba(15, 23, 42, 0.5));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 390px;
  align-items: center;
  gap: 48px;
  padding: 96px 0 88px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: #e0f2fe;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.28);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.35);
}

.hero-title {
  max-width: 780px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 760px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  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(135deg, var(--primary), #38bdf8);
  box-shadow: 0 18px 35px rgba(2, 132, 199, 0.3);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-panel {
  padding: 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
}

.hero-panel-info {
  display: grid;
  gap: 10px;
  padding: 16px 4px 2px;
  color: #ffffff;
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.24);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-control,
.hero-dot {
  cursor: pointer;
  border: 0;
}

.hero-control {
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-dots {
  display: flex;
  gap: 7px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  width: 28px;
  background: #38bdf8;
}

.search-strip {
  position: relative;
  z-index: 10;
  margin-top: -38px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.search-box input,
.search-box select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.search-box input:focus,
.search-box select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.main-content {
  padding: 72px 0 0;
}

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

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

.section-head h1,
.section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  scroll-snap-align: start;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

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

.poster-mask {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  padding: 8px 14px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.9);
  font-size: 13px;
  font-weight: 800;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #d97706);
  font-weight: 900;
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.3);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-body h2 {
  margin: 8px 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--primary-dark);
}

.card-body p {
  min-height: 46px;
  margin: 0 0 12px;
  color: #475569;
  font-size: 13px;
  line-height: 1.7;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-foot a {
  color: var(--primary-dark);
}

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

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0369a1 55%, #d97706);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
}

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

.category-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.page-hero {
  padding: 78px 0 50px;
  background: radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.22), transparent 28%), linear-gradient(135deg, #0f172a, #075985 58%, #0f172a);
  color: #ffffff;
}

.page-hero .container {
  display: grid;
  gap: 18px;
}

.page-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.85;
}

.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 46px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.player-card,
.detail-box,
.side-box {
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-stage {
  position: relative;
  background: #020617;
}

.player-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
  cursor: pointer;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 22px 50px rgba(2, 132, 199, 0.35);
  cursor: pointer;
}

.play-button span {
  margin-left: 5px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #ffffff;
}

.player-info {
  padding: 24px;
}

.player-info h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.player-info p {
  color: #475569;
  line-height: 1.85;
}

.detail-box {
  margin-top: 24px;
  padding: 26px;
}

.detail-box h2,
.side-box h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-box p {
  margin: 0 0 18px;
  color: #334155;
  line-height: 1.95;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.detail-meta strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
}

.detail-meta span {
  color: #64748b;
  font-weight: 700;
}

.side-box {
  padding: 18px;
  position: sticky;
  top: 96px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 76px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-item p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.site-footer {
  margin-top: 90px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.footer-grid p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

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

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

.footer-links a:hover {
  color: #7dd3fc;
}

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

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
}

.empty-state.is-visible {
  display: block;
}

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

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

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

  .menu-button {
    display: flex;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-panel {
    max-width: 360px;
  }

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

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

  .side-box {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 64px;
  }

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

  .hero-slider {
    min-height: 730px;
  }

  .hero-inner {
    padding: 62px 0 90px;
  }

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

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

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

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

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

  .player-info,
  .detail-box {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .container,
  .section-block,
  .detail-layout,
  .nav-wrap,
  .mobile-nav,
  .hero-inner {
    width: min(100% - 22px, 1280px);
  }

  .movie-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    font-size: 15px;
  }

  .card-body p {
    display: none;
  }

  .card-tags {
    display: none;
  }

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