:root {
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --cyan: #0891b2;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

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

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  font-size: 15px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 600;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--blue);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--slate-800);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  padding: 12px 14px;
  color: var(--slate-700);
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: var(--gray-100);
  color: var(--blue);
}

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

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100% - 1200px) / 2));
  width: min(640px, calc(100% - 48px));
  transform: translateY(-50%);
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 18px;
  padding: 6px 13px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  background: var(--blue);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  display: -webkit-box;
  max-width: 620px;
  margin: 0 0 22px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.hero-tags {
  margin-bottom: 26px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 11px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  background: #dbeafe;
  border-radius: 999px;
}

.watch-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 800;
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.watch-button {
  color: var(--white);
  background: var(--blue);
  border: 0;
  cursor: pointer;
  box-shadow: 0 16px 24px rgba(37, 99, 235, 0.25);
}

.watch-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.ghost-button.dark {
  color: var(--slate-900);
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.52);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 20;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 18px;
  height: 5px;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

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

.content-section.soft-bg {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100% - 1200px) / 2));
  padding-left: max(16px, calc((100% - 1200px) / 2));
  background: var(--white);
}

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

.section-heading h2 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0;
  color: var(--gray-500);
}

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

.scroll-row {
  display: grid;
  grid-auto-columns: minmax(250px, 300px);
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding: 2px 4px 18px;
  scrollbar-width: thin;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card a {
  display: block;
  height: 100%;
}

.movie-card figure {
  position: relative;
  height: 226px;
  margin: 0;
  overflow: hidden;
  background: var(--gray-200);
}

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

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

.year-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: var(--blue);
  border-radius: 999px;
}

.play-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-line {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}

.card-line {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: var(--gray-700);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card-horizontal a {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.movie-card-horizontal figure {
  height: 100%;
  min-height: 150px;
}

.movie-card-horizontal .card-body h3 {
  min-height: auto;
}

.category-panel {
  padding-bottom: 28px;
}

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

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

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

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

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.12));
}

.tile-content {
  position: absolute;
  inset: auto 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tile-content strong {
  font-size: 22px;
}

.tile-content em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-style: normal;
}

.tile-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tile-samples span {
  padding: 4px 8px;
  color: #dbeafe;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.35);
  border-radius: 999px;
}

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

.rank-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
}

.rank-card a {
  display: grid;
  grid-template-columns: 52px 74px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 100px;
  padding: 12px 14px;
}

.rank-number {
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-card img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

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

.page-main {
  min-height: 60vh;
}

.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  width: min(1200px, calc(100% - 32px));
  min-height: 290px;
  margin: 28px auto 0;
  padding: 42px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--slate-900));
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.page-hero::after {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  content: "";
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
}

.page-hero p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.small-hero {
  min-height: 220px;
}

.filter-panel {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin-bottom: 24px;
}

.filter-panel label {
  color: var(--slate-700);
  font-weight: 800;
}

.filter-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  outline: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.filter-panel input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.wide-filter {
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 18px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 24px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: var(--white);
  text-align: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.26));
  border: 0;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  color: var(--blue);
  font-size: 32px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  max-width: 70%;
  font-size: 24px;
  line-height: 1.35;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-side > img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-actions {
  display: grid;
  gap: 12px;
}

.detail-info {
  padding-top: 38px;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  padding: 6px 12px;
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 700;
  background: var(--gray-100);
  border-radius: 999px;
}

.detail-info h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-info p {
  max-width: 900px;
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.85;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 32px;
}

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

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: var(--white);
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

[data-filter-card].is-hidden {
  display: none;
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-mask {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2));
  }

  .hero-content {
    top: auto;
    bottom: 64px;
    left: 20px;
    width: calc(100% - 40px);
    transform: none;
  }

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

  .hero-arrow {
    top: auto;
    bottom: 20px;
    width: 42px;
    height: 42px;
  }

  .hero-prev {
    left: 20px;
  }

  .hero-next {
    right: 20px;
  }

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

  .movie-card figure {
    height: 250px;
  }

  .movie-card-horizontal a {
    grid-template-columns: 128px 1fr;
  }

  .movie-card-horizontal figure {
    min-height: 170px;
  }

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

  .page-hero {
    min-height: 220px;
    padding: 28px;
    border-radius: 22px;
  }

  .detail-side {
    display: block;
  }

  .detail-side > img {
    display: none;
  }

  .player-shell {
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .nav-wrap,
  .content-section,
  .breadcrumb,
  .detail-hero,
  .footer-grid,
  .copyright,
  .page-hero {
    width: calc(100% - 24px);
  }

  .brand {
    font-size: 18px;
  }

  .scroll-row {
    grid-auto-columns: minmax(230px, 82vw);
  }

  .movie-card-horizontal a {
    display: block;
  }

  .movie-card-horizontal figure {
    height: 230px;
  }

  .rank-card a {
    grid-template-columns: 44px 64px 1fr;
    gap: 10px;
  }

  .rank-card img {
    width: 64px;
    height: 64px;
  }
}
