* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.96), rgba(239, 246, 255, 0.96));
  border-bottom: 1px solid #bae6fd;
  box-shadow: 0 1px 8px rgba(14, 116, 144, 0.08);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  color: #1f2937;
  font-size: 20px;
  font-weight: 800;
}

.brand-text small {
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
}

.desktop-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-weight: 600;
}

.desktop-menu a:hover,
.mobile-menu a:hover,
.section-more:hover,
.card-body h3 a:hover {
  color: #0284c7;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #374151;
  background: #e0f2fe;
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid #bae6fd;
}

.mobile-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 600;
}

.mobile-menu.is-open {
  display: block;
}

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

.hero {
  position: relative;
  min-height: 500px;
  margin-bottom: 56px;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 25px 50px rgba(2, 132, 199, 0.24);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.35) 46%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 46px;
  color: #ffffff;
}

.hero-kicker,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  color: #ffffff;
  background: #0ea5e9;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

.btn-primary {
  color: #0284c7;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.22);
}

.btn-sky {
  color: #ffffff;
  background: #0284c7;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.24);
}

.btn-soft {
  color: #075985;
  background: #e0f2fe;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(520px, 100%);
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
}

.hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: #0f172a;
  background: transparent;
}

.hero-search button {
  border-radius: 999px;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 9px;
}

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

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

.section {
  margin-bottom: 56px;
}

.section-card {
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(90deg, #e0f2fe, #dbeafe);
  box-shadow: 0 18px 40px rgba(14, 116, 144, 0.12);
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  margin: 0;
  color: #1f2937;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900;
}

.section-head h2 span {
  display: inline-block;
  width: 5px;
  height: 32px;
  margin-right: 12px;
  border-radius: 999px;
  background: #0284c7;
}

.section-more {
  color: #0284c7;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.movie-card.small .poster-link,
.movie-grid.compact .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.12));
  transition: opacity 240ms ease;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  transition: opacity 240ms ease, transform 240ms ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
}

.meta-line b {
  color: #0369a1;
  background: #e0f2fe;
  padding: 4px 8px;
  border-radius: 999px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile {
  min-height: 158px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #e0f2fe);
  box-shadow: 0 14px 30px rgba(14, 116, 144, 0.1);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 45px rgba(14, 116, 144, 0.16);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.page-hero {
  margin-bottom: 34px;
  padding: 36px;
  color: #ffffff;
  border-radius: 28px;
  background: linear-gradient(135deg, #0369a1, #0ea5e9 48%, #2563eb);
  box-shadow: 0 22px 48px rgba(14, 116, 144, 0.22);
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #e0f2fe;
  font-size: 17px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #bae6fd;
  outline: 0;
  border-radius: 14px;
  padding: 12px 14px;
  color: #1f2937;
  background: #f8fafc;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 26px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 116px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.08);
}

.rank-item:hover {
  box-shadow: 0 15px 36px rgba(15, 23, 42, 0.13);
}

.rank-item img {
  width: 116px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.rank-num,
.rank-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #0284c7;
  border-radius: 999px;
  font-weight: 900;
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item strong {
  overflow: hidden;
  color: #1f2937;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em {
  margin-top: 5px;
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

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

.player-wrap {
  margin-bottom: 24px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.28);
}

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

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #020617;
}

.player-layer.is-hidden {
  display: none;
}

.player-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
}

.play-button {
  position: relative;
  z-index: 5;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 999px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.3);
  font-size: 30px;
  cursor: pointer;
}

.info-card,
.side-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.info-card {
  padding: 28px;
}

.info-card h1 {
  margin: 0 0 18px;
  color: #1f2937;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e7eb;
}

.detail-meta span {
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

.detail-section {
  margin-bottom: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 20px;
}

.detail-section p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
  white-space: pre-line;
}

.review-box {
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(90deg, #f0f9ff, #eff6ff);
}

.side-card {
  position: sticky;
  top: 90px;
  padding: 20px;
}

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

.related-list {
  display: grid;
  gap: 13px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 4px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

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

.no-results {
  display: none;
  padding: 28px;
  color: #64748b;
  text-align: center;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid #e0f2fe;
  background: #f8fafc;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #64748b;
}

.footer-inner strong {
  color: #1f2937;
  font-size: 18px;
}

.footer-inner p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-weight: 700;
}

.footer-links a:hover {
  color: #0284c7;
}

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

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

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .site-nav,
  .mobile-menu,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    min-height: 460px;
    border-radius: 20px;
  }

  .hero-content,
  .page-hero,
  .section-card,
  .info-card {
    padding: 22px;
  }

  .hero-search,
  .filter-panel {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .hero-search input {
    min-height: 48px;
  }

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

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

  .rank-item {
    grid-template-columns: 34px 92px minmax(0, 1fr);
    gap: 10px;
  }

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
