:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --indigo: #4f46e5;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --panel: #ffffff;
  --dark: #111827;
  --radius: 1rem;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
  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;
  background: #f9fafb;
  color: var(--ink);
  line-height: 1.6;
  -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: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 4rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
}

.nav-link {
  padding: 0.45rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: #eff6ff;
  color: var(--blue);
  border-radius: 0.65rem;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-content {
  position: relative;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 42rem;
  color: #fff;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #60a5fa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-summary {
  margin: 1rem 0 1.4rem;
  font-size: 1.25rem;
  color: #e5e7eb;
  max-width: 38rem;
}

.hero-tags,
.tag-row,
.card-meta,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(6px);
}

.detail-tags span,
.movie-card .tag-row span {
  background: #eff6ff;
  color: #1d4ed8;
}

.hero-actions {
  margin-top: 1.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.72rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.btn.primary:hover {
  background: var(--blue-dark);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  z-index: 5;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: #fff;
}

.content-section,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.content-section {
  padding-top: 4rem;
  padding-bottom: 1rem;
}

.intro-section {
  padding-top: 3.3rem;
}

.section-heading {
  margin-bottom: 1.6rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.category-card p,
.footer-brand p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.section-link,
.category-preview-card .section-heading a {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

.search-panel {
  margin: 1.4rem 0 2rem;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 0.85rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.search-box input,
.search-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-panel select {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0 0.9rem;
}

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

.dense-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

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

.movie-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  height: 13rem;
  overflow: hidden;
  background: #dbeafe;
}

.compact .poster-link {
  height: 10.5rem;
}

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

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

.card-year,
.rank-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-badge {
  left: 0.75rem;
  right: auto;
  background: #111827;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.3rem;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.22s ease, background 0.22s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  background: rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 1rem;
}

.compact .card-body {
  padding: 0.85rem;
}

.card-body h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-body h3 a:hover {
  color: var(--blue);
}

.card-body p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  gap: 0.45rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.45rem;
  color: #9ca3af;
}

.movie-card .tag-row {
  margin-top: 0.75rem;
  gap: 0.35rem;
}

.movie-card .tag-row span {
  padding: 0.22rem 0.5rem;
  font-size: 0.74rem;
}

.category-zone {
  max-width: 100%;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.category-zone > .section-heading,
.category-zone > .category-grid {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.category-preview-card,
.category-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.compact-heading {
  align-items: center;
  margin-bottom: 1rem;
}

.compact-heading h3 {
  font-size: 1.35rem;
}

.compact-heading p {
  font-size: 0.92rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.rank-zone {
  padding-top: 4rem;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.rank-row {
  display: grid;
  grid-template-columns: auto 4.7rem 1fr auto;
  align-items: center;
  gap: 0.9rem;
  min-height: 5rem;
  padding: 0.65rem;
  background: #fff;
  border-radius: 0.9rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.rank-row img {
  width: 4.7rem;
  height: 3.6rem;
  border-radius: 0.65rem;
  object-fit: cover;
  background: #dbeafe;
}

.row-rank {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.rank-title {
  font-weight: 850;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.page-main {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.page-hero {
  margin: 1.5rem 0 2rem;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #111827, #1d4ed8);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.page-hero p {
  max-width: 56rem;
  color: #dbeafe;
  font-size: 1.05rem;
}

.slim-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.category-card {
  padding: 0;
  overflow: hidden;
}

.category-card a {
  display: block;
  padding: 1.25rem;
}

.category-card h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin: 1rem 0;
}

.category-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0.65rem;
  object-fit: cover;
  background: #dbeafe;
}

.category-card span {
  color: var(--blue);
  font-weight: 850;
}

.rank-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.breadcrumb {
  margin: 0.5rem 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  box-shadow: var(--shadow);
  min-height: 420px;
}

.movie-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.38);
}

.detail-panel {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0.95rem;
  object-fit: cover;
  background: #dbeafe;
}

.detail-info {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.detail-info p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 0.6rem;
}

.detail-info strong {
  color: var(--ink);
}

.detail-content {
  max-width: 900px;
  margin-left: 0;
}

.lead-text {
  margin: 1rem 0 1.25rem;
  font-size: 1.18rem;
  color: #374151;
}

.detail-content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.55rem;
  font-weight: 900;
}

.detail-content p {
  color: #374151;
  font-size: 1.03rem;
}

.site-footer {
  margin-top: 4rem;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
}

.brand-footer {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.9rem 1.2rem;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.1rem 1rem 1.4rem;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
  font-size: 0.9rem;
}

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

@media (max-width: 1180px) {
  .nav-menu {
    gap: 0.75rem;
    font-size: 0.9rem;
  }

  .dense-grid,
  .all-grid,
  .rank-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 4rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
  }

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

  .nav-link {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #eef2f7;
  }

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

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

  .category-grid,
  .rank-list,
  .footer-inner,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

  .detail-panel {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1rem;
  }

  .detail-cover {
    height: 220px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 1.05rem;
  }

  .hero-carousel {
    height: auto;
    min-height: 600px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 5.5rem;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-content h1 {
    font-size: 2.15rem;
  }

  .hero-summary {
    font-size: 1rem;
  }

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

  .movie-grid,
  .dense-grid,
  .all-grid,
  .mini-grid,
  .category-overview-grid,
  .rank-board {
    grid-template-columns: 1fr;
  }

  .poster-link,
  .compact .poster-link {
    height: 14rem;
  }

  .rank-row {
    grid-template-columns: auto 4.2rem 1fr;
  }

  .rank-meta {
    display: none;
  }

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

  .detail-cover {
    height: auto;
  }

  .player-card,
  .movie-video {
    min-height: 260px;
  }
}
