:root {
  --site-bg: #f8fafc;
  --site-card: #ffffff;
  --site-text: #111827;
  --site-muted: #6b7280;
  --site-line: #e5e7eb;
  --site-dark: #111827;
  --site-accent: #111827;
  --site-radius: 1rem;
  --site-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

body {
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #f8fafc 100%);
}

.site-header {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: var(--site-text);
  letter-spacing: -0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.22);
  font-size: 0.8rem;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link,
.mobile-link {
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #111827;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #f3f4f6;
  color: #111827;
}

.mobile-nav {
  display: none;
  padding: 0.75rem 0 1rem;
  border-top: 1px solid #eef2f7;
}

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

.hero-section {
  background: #111827;
}

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

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

.hero-copy h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  max-width: 42rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.primary-button,
.ghost-button,
.section-more,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  padding: 0.85rem 1.45rem;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(255, 255, 255, 0.18);
}

.ghost-button {
  padding: 0.85rem 1.45rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.search-panel button:hover {
  transform: translateY(-1px);
}

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

.hero-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.search-band {
  margin-top: -2rem;
  position: relative;
  z-index: 35;
}

.search-panel {
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--site-shadow);
  backdrop-filter: blur(18px);
}

.search-panel label {
  display: block;
  margin-bottom: 0.75rem;
  color: #111827;
  font-weight: 800;
}

.search-row {
  display: flex;
  gap: 0.75rem;
}

.search-row input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  padding: 0.8rem 1rem;
  color: #111827;
  outline: none;
}

.search-row input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #111827;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.search-panel button {
  flex: 0 0 auto;
  padding: 0.8rem 1.4rem;
  color: #ffffff;
  background: #111827;
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.section-head h2,
.page-hero h1,
.detail-title-block h1 {
  color: #111827;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.section-head p,
.page-hero p,
.detail-title-block p {
  margin-top: 0.5rem;
  color: #6b7280;
  line-height: 1.75;
}

.section-more {
  flex: 0 0 auto;
  padding: 0.7rem 1.1rem;
  color: #111827;
  background: #f3f4f6;
}

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

.movie-card {
  position: relative;
}

.poster-frame {
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2), transparent 26%), linear-gradient(135deg, #1f2937, #111827 50%, #374151);
}

.image-fallback {
  opacity: 0;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.movie-tags span,
.detail-tags span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 0.75rem;
  line-height: 1.2;
}

.card-category-link {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: #6b7280;
  font-size: 0.78rem;
}

.card-category-link:hover {
  color: #111827;
}

.ranking-strip {
  padding: 4rem 0;
  background: linear-gradient(180deg, #f3f4f6, #ffffff);
}

.ranking-list,
.ranking-page-list {
  display: grid;
  gap: 0.85rem;
}

.ranking-list li,
.ranking-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem;
}

.rank-number,
.ranking-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: #ffffff;
  background: #111827;
  font-weight: 850;
}

.compact-card,
.rank-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.65rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid #eef2f7;
}

.compact-thumb,
.rank-poster {
  position: relative;
  flex: 0 0 auto;
  width: 5rem;
  height: 3.5rem;
  border-radius: 0.7rem;
  overflow: hidden;
}

.rank-poster {
  width: 7rem;
  height: 4.8rem;
}

.compact-body,
.rank-info {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.compact-body strong,
.rank-info strong {
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-body small,
.rank-info small,
.rank-info em {
  color: #6b7280;
  font-size: 0.78rem;
  font-style: normal;
}

.home-category-block {
  margin-top: 4rem;
}

.page-shell {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.page-hero {
  margin-bottom: 2rem;
}

.simple-hero {
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #ffffff, #f3f4f6);
  border: 1px solid #eef2f7;
  box-shadow: var(--site-shadow);
}

.simple-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

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

.category-tile {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

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

.mini-poster {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 0.75rem;
  overflow: hidden;
}

.category-copy h2 {
  color: #111827;
  font-size: 1.25rem;
  font-weight: 800;
}

.category-copy p {
  margin-top: 0.35rem;
  color: #6b7280;
}

.category-copy span {
  display: inline-flex;
  margin-top: 0.75rem;
  color: #111827;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.filter-bar span[data-result-count] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border-radius: 999px;
  color: #ffffff;
  background: #111827;
  font-weight: 800;
}

.detail-page {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

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

.breadcrumb a:hover {
  color: #111827;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.25);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(17, 24, 39, 0.15), rgba(0, 0, 0, 0.65));
}

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

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.play-overlay strong {
  font-size: 1.2rem;
}

.play-overlay em {
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
  font-size: 0.9rem;
}

.detail-title-block,
.content-card,
.side-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.detail-title-block h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.content-card h2,
.side-card h2 {
  margin-bottom: 0.75rem;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 850;
}

.content-card p {
  color: #374151;
  line-height: 2;
  white-space: pre-line;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 1.5rem;
}

.poster-card {
  margin-top: 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 3 / 4;
}

.poster-card dl {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.poster-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #eef2f7;
}

.poster-card dt {
  color: #6b7280;
}

.poster-card dd {
  color: #111827;
  font-weight: 700;
  text-align: right;
}

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

.related-section {
  margin-top: 3rem;
}

.site-footer {
  padding: 3rem 0 2rem;
  background: #111827;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 1rem;
}

.site-footer p {
  max-width: 40rem;
  line-height: 1.8;
}

.site-footer h3 {
  margin-bottom: 0.85rem;
  color: #ffffff;
  font-weight: 800;
}

.site-footer a {
  display: block;
  margin: 0.35rem 0;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-tags a {
  margin: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .filter-bar {
    grid-template-columns: 1fr 12rem 10rem auto;
  }

  .search-page .filter-bar {
    grid-template-columns: 1fr 10rem 10rem 10rem auto;
  }
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .menu-button {
    display: none;
  }

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

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

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

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

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

  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(20rem, 0.85fr);
  }
}

@media (min-width: 1280px) {
  .movie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (max-width: 639px) {
  .search-row {
    flex-direction: column;
  }

  .section-head {
    display: grid;
  }

  .hero-section {
    height: 560px;
  }

  .ranking-list li,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .rank-number,
  .ranking-index {
    width: 2rem;
    height: 2rem;
  }
}

.plain-link-index {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid #eef2f7;
}

.plain-link-index li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #f3f4f6;
}

.plain-link-index a {
  color: #111827;
  font-weight: 700;
}

.plain-link-index span {
  color: #6b7280;
}
