:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #1e40af;
  --primary-700: #1d3a8a;
  --secondary-50: #f0fdf4;
  --secondary-600: #065f46;
  --accent-50: #fff7ed;
  --accent-600: #92400e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-900);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  font-weight: 800;
}

.brand-text small {
  color: var(--gray-500);
  font-size: 12px;
}

.nav-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.nav-links a,
.mobile-menu a,
.footer-links a,
.section-heading a,
.breadcrumb,
.detail-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.nav-links a {
  color: var(--gray-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-600);
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.header-search input,
.mobile-menu input,
.search-hero-form input,
.page-filter,
.year-filter {
  border: 0;
  outline: 0;
  background: var(--white);
  color: var(--gray-900);
}

.header-search input {
  width: 190px;
  padding: 10px 12px;
}

.header-search button,
.mobile-menu button,
.search-hero-form button {
  border: 0;
  color: var(--white);
  background: var(--primary-600);
  padding: 10px 14px;
  font-weight: 700;
}

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

.mobile-menu {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--gray-200);
}

.mobile-menu.open {
  display: grid;
  gap: 14px;
}

.mobile-menu a {
  font-weight: 700;
}

.mobile-menu form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
}

.mobile-menu input {
  flex: 1;
  min-width: 0;
  padding: 12px;
}

.home-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 48%, var(--secondary-600));
}

.hero-inner {
  padding: 64px 0;
}

.hero-title {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.hero-title h1,
.sub-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-title p,
.sub-hero p {
  margin: 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 360px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: min(58vw, 540px);
  min-height: 360px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: absolute;
  left: clamp(22px, 6vw, 72px);
  right: clamp(22px, 6vw, 72px);
  bottom: clamp(22px, 6vw, 64px);
  max-width: 720px;
}

.hero-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--white);
  background: var(--primary-500);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-content h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 900;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(15px, 2vw, 19px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 800;
}

.primary-button {
  color: var(--primary-600);
  background: var(--white);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  font-size: 32px;
  line-height: 1;
  transition: background 0.2s ease;
}

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

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

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

.section-block {
  padding: 64px 0;
}

.soft-bg {
  background: linear-gradient(135deg, var(--secondary-50), var(--primary-50));
}

.accent-bg {
  background: linear-gradient(135deg, var(--accent-50), var(--secondary-50));
}

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

.section-heading h2,
.ranking-panel h2,
.detail-main h2,
.related-box h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
}

.section-heading a {
  color: var(--primary-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

.six-col {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

.movie-card {
  min-width: 0;
}

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  color: inherit;
  background: var(--white);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e5e7eb;
}

.compact-card .movie-link {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 160px;
}

.compact-card .poster-frame {
  height: 100%;
  min-height: 160px;
  aspect-ratio: auto;
}

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

.movie-link:hover .poster-frame img {
  transform: scale(1.07);
}

.type-badge,
.rank-number {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  border-radius: 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  right: 12px;
  padding: 0 10px;
  background: var(--primary-600);
}

.rank-number {
  left: 12px;
  background: var(--accent-600);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .movie-info h3 {
  min-height: 0;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-info p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--primary-600);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile,
.category-card-large {
  color: inherit;
  text-decoration: none;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile {
  padding: 22px;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-600);
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-card-large p {
  margin: 0;
  color: var(--gray-700);
}

.sub-hero {
  padding: 76px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

.category-hero {
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
}

.category-card-large img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.category-card-large div {
  padding: 24px;
}

.category-card-large span {
  color: var(--primary-600);
  font-weight: 900;
}

.category-card-large h2 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 14px;
  margin-bottom: 24px;
}

.page-filter,
.year-filter,
.search-hero-form input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 13px 15px;
}

.search-hero-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  max-width: 720px;
  margin-top: 26px;
}

.search-hero-form button {
  border-radius: 14px;
}

.ranking-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.ranking-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.ranking-panel h2 {
  margin-bottom: 8px;
}

.detail-top {
  padding: 24px 0 54px;
  color: var(--white);
  background: linear-gradient(135deg, var(--gray-900), var(--primary-700));
}

.detail-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
  color: #dbeafe;
  font-size: 14px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: center;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.22));
  text-align: center;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto;
  border-radius: 999px;
  color: var(--primary-600);
  background: var(--white);
  font-size: 30px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.player-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 900;
}

.player-copy p {
  margin: 0 0 18px;
  color: #e5e7eb;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

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

.detail-main,
.related-box {
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.detail-main {
  padding: 32px;
}

.detail-main h2 {
  margin: 0 0 14px;
}

.detail-main p {
  margin: 0 0 26px;
  color: var(--gray-700);
  font-size: 17px;
}

.related-box {
  position: sticky;
  top: 98px;
  padding: 22px;
}

.related-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.site-footer {
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
  padding: 54px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 20px;
}

.footer-brand p {
  max-width: 520px;
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--primary-100);
}

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

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

@media (max-width: 1100px) {
  .six-col,
  .five-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-links,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .six-col,
  .five-col,
  .category-grid,
  .ranking-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col,
  .category-large-grid,
  .ranking-columns,
  .player-layout,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .related-box {
    position: static;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-inner {
    padding: 44px 0;
  }

  .hero-carousel,
  .movie-link,
  .category-tile,
  .detail-main,
  .related-box {
    border-radius: 16px;
  }

  .hero-slide img {
    height: 470px;
  }

  .hero-control {
    display: none;
  }

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

  .six-col,
  .five-col,
  .two-col,
  .category-grid,
  .ranking-strip {
    grid-template-columns: 1fr;
  }

  .compact-card .movie-link,
  .category-card-large,
  .filter-panel,
  .search-hero-form {
    grid-template-columns: 1fr;
  }

  .compact-card .poster-frame {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .detail-main {
    padding: 22px;
  }
}
