:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --red-soft: #fee2e2;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.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.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-900);
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.28);
  font-size: 15px;
}

.logo-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--gray-100);
  border-radius: 999px;
}

.header-search input,
.mobile-search input,
.large-search input,
.local-filter {
  border: 0;
  outline: 0;
  background: #ffffff;
  color: var(--gray-900);
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 180px;
}

.header-search button,
.mobile-search button,
.large-search button {
  border: 0;
  color: #ffffff;
  background: var(--red);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: var(--gray-100);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  display: block;
  padding: 10px 12px;
  color: var(--gray-700);
  background: var(--gray-100);
  border-radius: 12px;
  font-weight: 700;
}

.mobile-link.active {
  color: #ffffff;
  background: var(--red);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  background: var(--gray-100);
}

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-900), var(--red-dark), var(--gray-900));
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 50%, rgba(248, 113, 113, 0.18), transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #ffffff;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.72);
  border: 1px solid rgba(254, 202, 202, 0.25);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #f3f4f6;
  font-size: 20px;
}

.hero-tags,
.detail-tags,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.detail-tags span,
.detail-tags a,
.quick-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

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

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

.primary-button {
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.35);
}

.secondary-button {
  color: var(--gray-900);
  background: #ffffff;
}

.secondary-button:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.content-section {
  padding: 72px 0;
  background: #ffffff;
}

.section-dark {
  background: var(--gray-900);
  color: #ffffff;
}

.soft-bg {
  background: var(--gray-100);
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-title-row.tight {
  margin-bottom: 18px;
}

.section-title-row h2,
.feature-panel h2,
.detail-more h2,
.aside-card h2,
.info-card h2,
.category-feature h2 {
  margin: 0 0 8px;
  color: inherit;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-title-row p,
.feature-panel p,
.info-card p,
.category-feature p {
  margin: 0;
  color: var(--gray-600);
}

.section-dark .section-title-row p,
.section-dark .card-meta {
  color: #d1d5db;
}

.section-more {
  color: var(--red);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  display: block;
  min-width: 0;
  color: var(--gray-900);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.16);
}

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

.movie-card:hover .poster-wrap img,
.mini-card:hover img,
.ranking-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.88);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.type-badge,
.rating-badge {
  position: absolute;
  z-index: 1;
  padding: 4px 8px;
  color: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  top: 10px;
  right: 10px;
  background: var(--red);
}

.rating-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.64);
}

.card-title,
.card-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title {
  margin-top: 10px;
  color: inherit;
  font-weight: 800;
  transition: color 0.2s ease;
}

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

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

.card-dark {
  color: #ffffff;
}

.card-dark .card-meta {
  color: #9ca3af;
}

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

.category-card,
.category-overview,
.feature-panel,
.info-card,
.aside-card,
.detail-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  color: #ffffff;
  background: var(--gray-900);
}

.category-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  transition: transform 0.32s ease;
}

.category-card:hover .category-bg {
  transform: scale(1.08);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.2));
}

.category-content {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.category-content strong,
.overview-copy strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.category-content small,
.overview-copy small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 30px;
  align-items: start;
}

.rank-list,
.mini-list,
.ranking-list {
  display: grid;
  gap: 12px;
}

.rank-row,
.ranking-card,
.mini-card {
  display: grid;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover,
.ranking-card:hover,
.mini-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-row {
  grid-template-columns: 42px 56px 1fr auto;
  padding: 10px;
}

.rank-number,
.ranking-index {
  color: var(--red);
  font-weight: 900;
  font-size: 20px;
  text-align: center;
}

.rank-row img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-text strong,
.ranking-info strong,
.mini-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.rank-text small,
.ranking-info small,
.mini-card small {
  display: block;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em,
.ranking-score,
.mini-card em {
  color: #f59e0b;
  font-style: normal;
  font-weight: 900;
}

.feature-panel {
  padding: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gray-900), var(--red-dark));
}

.feature-panel p {
  color: #f3f4f6;
}

.light-panel {
  color: var(--gray-900);
  background: #ffffff;
}

.light-panel p {
  color: var(--gray-600);
}

.large-search {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.large-search input {
  flex: 1;
  min-width: 0;
}

.quick-links {
  margin-top: 22px;
  margin-bottom: 0;
}

.quick-links a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.page-hero {
  padding: 78px 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gray-900), var(--red-dark), var(--gray-900));
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #f3f4f6;
  font-size: 19px;
}

.category-overview {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #ffffff;
}

.overview-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 14px;
}

.overview-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.overview-copy strong {
  color: var(--gray-900);
}

.overview-copy small {
  color: var(--gray-600);
}

.category-feature .mini-card {
  background: #ffffff;
}

.local-filter {
  width: 100%;
  margin-top: 22px;
  background: var(--gray-100);
}

.ranking-filter {
  margin-bottom: 24px;
}

.ranking-card {
  grid-template-columns: 62px 86px minmax(0, 1fr) 90px;
  padding: 14px;
  background: #ffffff;
}

.ranking-card img {
  width: 86px;
  height: 122px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.32s ease;
}

.ranking-info em {
  display: -webkit-box;
  margin-top: 8px;
  color: var(--gray-600);
  font-style: normal;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-main {
  min-height: 100vh;
  color: #ffffff;
  background: var(--gray-950);
  padding: 28px 0 76px;
}

.detail-container {
  width: min(1220px, calc(100% - 32px));
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #9ca3af;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.detail-primary {
  min-width: 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.22), rgba(0, 0, 0, 0.4));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 18px 45px rgba(220, 38, 38, 0.35);
  font-size: 32px;
}

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

.detail-card {
  margin-top: 18px;
  padding: 28px;
  color: #ffffff;
  background: var(--gray-900);
  box-shadow: none;
}

.detail-heading h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.detail-tags span,
.detail-tags a {
  color: #ffffff;
  background: var(--gray-800);
}

.detail-tags a {
  background: var(--red);
}

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

.detail-meta div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.detail-meta dt {
  color: #9ca3af;
  font-size: 13px;
}

.detail-meta dd {
  margin: 6px 0 0;
  color: #ffffff;
  font-weight: 800;
}

.detail-text {
  margin-top: 24px;
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-text p {
  margin: 0;
  color: #d1d5db;
  font-size: 16px;
  line-height: 1.9;
}

.detail-aside {
  display: grid;
  gap: 18px;
}

.aside-card {
  padding: 20px;
  background: var(--gray-900);
  box-shadow: none;
}

.aside-card h2 {
  font-size: 22px;
}

.mini-card {
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 10px;
}

.mini-card img {
  width: 72px;
  height: 102px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.32s ease;
}

.mini-dark {
  color: #ffffff;
  background: var(--gray-800);
}

.mini-dark small {
  color: #9ca3af;
}

.poster-info img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.poster-info p {
  margin: 14px 0 0;
  color: #d1d5db;
}

.detail-more {
  margin-top: 42px;
}

.detail-more h2 {
  margin-bottom: 22px;
  color: #ffffff;
}

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

.info-card {
  padding: 28px;
  background: #ffffff;
}

.is-filtered-out {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px;
  text-align: center;
  color: var(--gray-600);
  background: var(--gray-100);
  border-radius: var(--radius);
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

  .two-column,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
  }

  .logo-text {
    font-size: 18px;
  }

  .hero-carousel {
    height: 560px;
  }

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

  .content-section {
    padding: 48px 0;
  }

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

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

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

  .rank-row {
    grid-template-columns: 36px 52px 1fr;
  }

  .rank-row em {
    display: none;
  }

  .ranking-card {
    grid-template-columns: 42px 70px minmax(0, 1fr);
  }

  .ranking-score {
    display: none;
  }

  .ranking-card img {
    width: 70px;
    height: 100px;
  }

  .large-search {
    flex-direction: column;
  }

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

  .detail-card {
    padding: 20px;
  }
}
