html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.3);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #475569;
  flex: 1;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #0284c7;
}

.header-search {
  display: flex;
  align-items: center;
  width: 320px;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px;
  border: 1px solid #e2e8f0;
}

.header-search input,
.filter-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 14px;
  color: #0f172a;
}

.header-search button,
.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.25s ease;
}

.header-search button,
.primary-btn {
  background: #0284c7;
  color: #fff;
  padding: 10px 18px;
}

.header-search button:hover,
.primary-btn:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 12px 24px;
  backdrop-filter: blur(10px);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.mobile-menu-btn {
  display: none;
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  color: #0f172a;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.42), rgba(14, 165, 233, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
  margin: 0 0 26px;
  max-width: 680px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.7;
}

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

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-dot {
  width: 28px;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot.is-active {
  width: 52px;
  background: #fff;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

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

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

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: #64748b;
  line-height: 1.7;
}

.movie-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
  width: 310px;
  flex: 0 0 310px;
  scroll-snap-align: start;
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.68), transparent 58%);
}

.poster-category {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

.movie-card-body {
  padding: 18px;
}

.movie-card-body h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.5s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.1));
}

.category-card-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 24px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.55;
}

.big-card {
  display: block;
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
}

.big-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.big-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.big-card-content {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px;
}

.big-card-content h3 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.big-card-content p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  line-height: 1.7;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 32px;
}

.editor-list {
  display: grid;
  gap: 20px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.movie-card-wide .poster-wrap {
  height: 100%;
  min-height: 190px;
  aspect-ratio: auto;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.mini-card img {
  width: 110px;
  height: 86px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mini-card h3 {
  margin: 0 12px 4px 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.page-hero {
  background: linear-gradient(135deg, #e0f2fe, #f8fafc 60%, #ecfeff);
  border-bottom: 1px solid #e2e8f0;
}

.page-title {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.filter-bar {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 0 24px;
}

.filter-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-shell span {
  padding: 0 16px;
  color: #0284c7;
  font-weight: 900;
  white-space: nowrap;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0284c7;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 32px;
}

.detail-main,
.detail-side,
.content-card {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.48));
  cursor: pointer;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  background: rgba(14, 165, 233, 0.95);
  color: #fff;
  font-size: 36px;
  box-shadow: 0 24px 50px rgba(14, 165, 233, 0.38);
  transition: transform 0.25s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
}

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #64748b;
}

.info-row span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
}

.tag-pill {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

.tag-pill.small {
  padding: 5px 10px;
  font-size: 12px;
}

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

.detail-copy {
  display: grid;
  gap: 22px;
  color: #334155;
  line-height: 1.85;
}

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

.detail-copy p {
  margin: 0;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 22px;
}

.side-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  margin-bottom: 18px;
}

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

.detail-side h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 900;
}

.not-found {
  display: none;
  padding: 42px;
  text-align: center;
  color: #64748b;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  font-size: 14px;
}

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

  .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    padding: 0 16px;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    padding: 0 18px 42px;
  }

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

  .section,
  .page-title,
  .detail-layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-head {
    display: block;
  }

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

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

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

  .filter-shell {
    border-radius: 18px;
    align-items: stretch;
  }

  .filter-shell span {
    display: none;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-row .movie-card {
    width: 280px;
    flex-basis: 280px;
  }

  .hero-actions {
    display: grid;
  }

  .primary-btn,
  .secondary-btn {
    text-align: center;
  }
}
