:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --orange-50: #fff7ed;
  --amber-50: #fffbeb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  --shadow-hover: 0 18px 45px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.28);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--gray-700);
  font-size: 15px;
  white-space: nowrap;
}

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

.main-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--sky-600);
}

.header-search {
  display: flex;
  align-items: center;
  width: 260px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
}

.header-search button {
  border: 0;
  color: var(--white);
  background: var(--sky-600);
  padding: 10px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-900);
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--gray-200);
}

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

.mobile-nav form {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
}

.mobile-nav input {
  flex: 1;
  border: 0;
  padding: 10px 12px;
}

.mobile-nav button {
  border: 0;
  color: var(--white);
  background: var(--sky-600);
  padding: 10px 14px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.76),
    rgba(0, 0, 0, 0.42),
    rgba(0, 0, 0, 0.05)
  );
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-content h1 {
  max-width: 820px;
  margin: 10px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--sky-600);
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.38);
}

.btn-primary:hover {
  background: var(--sky-700);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn-outline {
  color: var(--sky-700);
  border: 1px solid var(--sky-100);
  background: var(--sky-50);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.hero-dots button.is-active {
  width: 52px;
  background: var(--white);
}

.section {
  padding: 72px 20px;
}

.section-white {
  background: var(--white);
}

.section-warm {
  background: linear-gradient(135deg, var(--orange-50), var(--amber-50));
}

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

.no-pad-top {
  padding-top: 24px;
}

.section-head {
  max-width: 1280px;
  margin: 0 auto 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--sky-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 6px 0 8px;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p {
  margin: 0;
  color: var(--gray-500);
}

.text-link {
  color: var(--sky-600);
  font-weight: 800;
  white-space: nowrap;
}

.horizontal-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 4px 16px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: thin;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.64), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.movie-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  color: var(--white);
  background: var(--sky-600);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 999px;
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

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

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  min-height: 50px;
  font-size: 18px;
  line-height: 1.38;
  font-weight: 800;
}

.movie-info h3 a:hover {
  color: var(--sky-600);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
}

.movie-info p {
  min-height: 68px;
  margin: 12px 0;
  color: var(--gray-500);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.movie-tags span,
.detail-tags a {
  padding: 5px 9px;
  color: var(--sky-700);
  background: var(--sky-50);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.rank-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 80px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

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

.rank-no {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 999px;
  font-weight: 900;
}

.rank-item img {
  width: 80px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-text small {
  color: var(--gray-500);
}

.rank-score {
  color: var(--sky-700);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 18px;
  color: var(--white);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.1);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1));
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 42px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 20px 42px;
}

.small-hero,
.category-page-hero,
.ranking-hero,
.search-hero {
  position: relative;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-stats span {
  padding: 8px 12px;
  color: var(--sky-700);
  background: var(--sky-50);
  border-radius: 999px;
  font-weight: 800;
}

.category-overview-list {
  max-width: 1280px;
  margin: 0 auto 70px;
  padding: 0 20px;
  display: grid;
  gap: 26px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr 1.5fr;
  gap: 22px;
  align-items: center;
  padding: 20px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.category-hero-link {
  position: relative;
  height: 170px;
  overflow: hidden;
  border-radius: 18px;
  color: var(--white);
}

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

.category-hero-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

.category-hero-link span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  font-size: 24px;
  font-weight: 900;
}

.category-overview-body h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-overview-body p {
  color: var(--gray-500);
}

.filter-panel {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.sticky-filter {
  position: sticky;
  top: 78px;
  z-index: 20;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 8px 12px;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.empty-state {
  max-width: 1280px;
  margin: 24px auto 70px;
  padding: 28px;
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
  border-radius: 18px;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--sky-600);
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 20px 40px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-hover);
  background: var(--gray-100);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-info .lead {
  max-width: 820px;
  color: var(--gray-700);
  font-size: 20px;
}

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

.detail-meta div {
  padding: 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-meta dt {
  color: var(--gray-500);
  font-size: 13px;
}

.detail-meta dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 44px;
}

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

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(
    circle,
    rgba(2, 132, 199, 0.22),
    rgba(0, 0, 0, 0.46)
  );
  cursor: pointer;
}

.video-player.is-playing .player-overlay {
  display: none;
}

.player-pulse {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.12);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 20px;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.84);
  font-size: 14px;
}

.detail-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.text-panel {
  padding: 26px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.detail-tags.wide a {
  font-size: 14px;
}

.detail-related {
  padding-top: 42px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  color: var(--white);
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p {
  color: #9ca3af;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

@media (max-width: 1180px) {
  .main-nav {
    gap: 14px;
    font-size: 14px;
  }

  .header-search {
    width: 220px;
  }

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

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

  .category-overview-card {
    grid-template-columns: 220px 1fr;
  }

  .category-overview-card .mini-grid {
    grid-column: 1 / -1;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    bottom: 66px;
  }

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

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

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

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

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

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

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

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

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

@media (max-width: 620px) {
  .header-inner {
    padding: 0 14px;
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 500px;
  }

  .hero-content,
  .hero-dots {
    width: calc(100% - 28px);
  }

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

  .section,
  .page-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .movie-grid,
  .compact-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-info h3 {
    min-height: auto;
  }

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

  .filter-panel {
    position: static;
    grid-template-columns: 1fr;
    margin-left: 14px;
    margin-right: 14px;
  }

  .rank-item {
    grid-template-columns: 38px 68px 1fr;
  }

  .rank-score {
    display: none;
  }

  .detail-hero,
  .player-section,
  .detail-content,
  .breadcrumb {
    padding-left: 14px;
    padding-right: 14px;
  }

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

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