:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-bg: #f9fafb;
  --color-card: #ffffff;
  --shadow-card: 0 16px 35px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 22px 50px rgba(37, 99, 235, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
  backdrop-filter: blur(16px);
}

.nav-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
}

.brand-text {
  font-size: 1.18rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.mobile-link {
  color: #374151;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
  color: var(--color-primary);
  background: #eff6ff;
}

.menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: var(--color-primary);
  background: #eff6ff;
  font-size: 1.2rem;
}

.mobile-nav {
  display: none;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.35rem;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 1rem;
  display: flex;
  align-items: center;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.85);
  font-size: 0.9rem;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 40rem;
  margin: 0 0 1.5rem;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.38rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.85rem;
  padding: 0.82rem 1.15rem;
  font-weight: 800;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--color-primary-dark);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

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

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

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

.page-main,
.section-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3.5rem 1rem;
}

.section-block {
  margin-bottom: 4rem;
}

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

.section-head h1,
.section-head h2,
.page-title,
.detail-title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p,
.page-lead,
.detail-lead {
  margin: 0.65rem 0 0;
  color: var(--color-muted);
  line-height: 1.8;
}

.filter-box {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.filter-label {
  display: grid;
  gap: 0.45rem;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 700;
}

.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.8rem 0.9rem;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-actions {
  display: flex;
  gap: 0.75rem;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.15rem;
}

.movie-grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 1rem;
  background: var(--color-card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.28);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card:not(.compact) .poster-frame {
  aspect-ratio: 2 / 3;
}

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

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

.duration-badge {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.22rem 0.48rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

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

.movie-card:hover .play-hover {
  opacity: 1;
}

.card-body {
  padding: 0.95rem;
}

.card-title {
  display: block;
  color: #111827;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.card-title:hover {
  color: var(--color-primary);
}

.card-line {
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card-meta {
  margin: 0.65rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.card-meta a {
  color: var(--color-primary);
  font-weight: 700;
}

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

.category-panel,
.info-panel {
  padding: 1.35rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow-card);
}

.category-panel h3,
.info-panel h2,
.info-panel h3 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.panel-list {
  display: grid;
  gap: 0.75rem;
}

.panel-list a {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem;
  border-radius: 0.8rem;
  color: #111827;
  background: rgba(255, 255, 255, 0.75);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.panel-list a:hover {
  color: var(--color-primary);
  background: #eff6ff;
}

.panel-list span {
  color: var(--color-muted);
  font-size: 0.85rem;
}

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

.rank-list {
  display: grid;
  gap: 0.55rem;
}

.rank-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.9rem;
  border-radius: 0.95rem;
  background: #fff;
  border: 1px solid var(--color-line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(37, 99, 235, 0.4);
}

.rank-no {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  font-weight: 900;
}

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

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

.page-hero {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border-bottom: 1px solid #dbeafe;
}

.page-hero-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3.5rem 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #6b7280;
  font-size: 0.9rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.8fr);
  gap: 1.5rem;
  align-items: start;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.4rem;
  background: #020617;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.28);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(0, 0, 0, 0.46));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

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

.play-button {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  color: #fff;
  background: var(--color-primary);
  font-size: 2rem;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
}

.detail-panel {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.9rem 0 1.2rem;
}

.detail-meta span,
.detail-meta a {
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-meta a {
  color: var(--color-primary);
  background: #eff6ff;
}

.text-section {
  line-height: 1.9;
  color: #374151;
}

.text-section h2 {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.35rem;
  color: #111827;
  font-weight: 900;
}

.sidebar-card {
  padding: 1.1rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
}

.sidebar-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.related-list {
  display: grid;
  gap: 0.85rem;
}

.related-list a {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  color: #111827;
}

.related-list img {
  width: 5.5rem;
  aspect-ratio: 16 / 10;
  border-radius: 0.8rem;
  object-fit: cover;
  background: #111827;
}

.related-list strong {
  display: block;
  line-height: 1.35;
}

.related-list span {
  color: var(--color-muted);
  font-size: 0.84rem;
}

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

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
}

.footer-brand {
  color: #fff;
  font-size: 1.2rem;
}

.footer-inner p {
  color: #9ca3af;
  line-height: 1.8;
  max-width: 44rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.footer-links a {
  color: #d1d5db;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.5);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}

.is-hidden,
.movie-card.is-hidden {
  display: none;
}

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

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

  .filter-box,
  .category-panels,
  .rank-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    flex-direction: column;
  }

  .section-head {
    display: block;
  }

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

@media (max-width: 640px) {
  .nav-container {
    min-height: 3.8rem;
  }

  .hero,
  .hero-content {
    min-height: 74vh;
  }

  .hero-content {
    padding-top: 3rem;
    padding-bottom: 4.5rem;
  }

  .movie-grid,
  .movie-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  .card-line,
  .tag-row {
    display: none;
  }

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

  .rank-meta {
    grid-column: 2;
  }
}
