:root {
  color-scheme: light;
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f8fafc;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.site-nav a {
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--sky);
}

.site-search {
  position: relative;
  width: 250px;
}

.site-search input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 0 44px 0 16px;
  outline: none;
}

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

.site-search button {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0284c7;
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.55), transparent 35%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.58) 46%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.70), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  padding: 88px 0 70px;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

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

.btn-primary {
  color: #ffffff;
  background: #0284c7;
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
  background: #0369a1;
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: max(16px, calc((100% - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 30px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 54px;
  background: #ffffff;
}

.section {
  padding: 64px 0;
}

.section-soft {
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}

.section-warm {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 16px;
}

.more-link {
  color: #0284c7;
  font-weight: 800;
}

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 310px;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scroll-snap-type: x proximity;
}

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.85);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #f1f5f9);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.55), transparent 42%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
  opacity: 1;
}

.badge,
.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: #0284c7;
}

.duration {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 48px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 14px;
  min-height: 45px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.rating {
  color: #f59e0b;
}

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

.category-tile {
  position: relative;
  min-height: 156px;
  padding: 24px;
  border-radius: 22px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  box-shadow: 0 16px 35px rgba(2, 132, 199, 0.18);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
}

.category-tile:nth-child(4n) {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.page-hero {
  padding: 58px 0 36px;
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.28), transparent 32%),
    linear-gradient(135deg, #ffffff, #f0f9ff);
  border-bottom: 1px solid #e2e8f0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.8;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.toolbar input,
.toolbar select {
  height: 42px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 26px 0 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0284c7;
  font-weight: 750;
}

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

.panel {
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
  cursor: pointer;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(1.08);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.32), rgba(2, 6, 23, 0.84));
}

.play-circle {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

.detail-body {
  padding: 28px;
}

.detail-body h1 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.info-list span,
.tag-list span,
.tag-list a {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

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

.detail-section {
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.detail-section + .detail-section {
  margin-top: 24px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

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

.side-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-item:hover {
  background: #f0f9ff;
  transform: translateY(-2px);
}

.side-item img {
  width: 112px;
  height: 84px;
  object-fit: cover;
}

.side-item div {
  min-width: 0;
  padding: 10px 10px 10px 0;
}

.side-item h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
  line-height: 1.75;
  font-size: 14px;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 56px 20px;
  text-align: center;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

.search-panel {
  max-width: 780px;
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.search-panel input {
  flex: 1;
  height: 52px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  padding: 0 20px;
  background: #ffffff;
  outline: none;
}

.search-panel button {
  min-width: 112px;
}

@media (max-width: 980px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    padding: 18px 20px 22px;
    flex-direction: column;
    align-items: stretch;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
  }

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

  .site-search {
    width: 100%;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

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

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

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

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 72px 0 64px;
  }

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

  .section {
    padding: 42px 0;
  }

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

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

  .movie-row {
    grid-auto-columns: 250px;
    gap: 16px;
  }

  .card-body {
    padding: 14px;
  }

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

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar input,
  .toolbar select,
  .search-panel input,
  .search-panel button {
    width: 100%;
  }

  .search-panel {
    flex-direction: column;
  }

  .detail-body {
    padding: 20px;
  }
}
