:root {
  --primary-50: #e6f1ff;
  --primary-100: #b3d9ff;
  --primary-500: #0073e6;
  --primary-600: #005bb3;
  --primary-700: #004380;
  --secondary-50: #f0f9ff;
  --secondary-600: #0284c7;
  --accent-300: #fbbf24;
  --accent-400: #f59e0b;
  --accent-500: #d97706;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 18px 48px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--neutral-50);
  color: var(--neutral-900);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: 0 3px 18px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(8px);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--primary-600);
  background: var(--primary-50);
  border-radius: 14px;
}

.brand-mark svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.brand-text strong {
  display: block;
  font-size: 1.22rem;
  line-height: 1.1;
  color: var(--neutral-900);
}

.brand-text small {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.74rem;
  color: var(--neutral-500);
}

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

.nav-link {
  color: var(--neutral-700);
  font-weight: 600;
}

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

.header-search {
  width: 260px;
  position: relative;
  display: flex;
}

.header-search input {
  width: 100%;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 0.7rem 2.75rem 0.7rem 1rem;
  outline: none;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.mobile-search input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.15);
}

.header-search button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: var(--primary-600);
  color: white;
  font-size: 1.1rem;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: var(--neutral-100);
  color: var(--neutral-700);
  border-radius: 10px;
  width: 42px;
  height: 42px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
  padding: 1rem;
  background: white;
}

.mobile-panel.is-open {
  display: block;
  animation: slideDown 0.24s ease-out;
}

.mobile-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  outline: none;
}

.mobile-search button,
.primary-button,
.secondary-button,
.play-detail-button {
  border: 0;
  border-radius: 12px;
  background: var(--primary-600);
  color: white;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.mobile-links {
  display: grid;
  gap: 0.35rem;
}

.mobile-nav-link {
  padding: 0.85rem 0.5rem;
  color: var(--neutral-700);
  font-weight: 600;
  border-radius: 10px;
}

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

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--neutral-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
  color: white;
  animation: fadeIn 0.5s ease-in-out;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: var(--accent-300);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.hero-desc {
  margin: 0 0 1.2rem;
  max-width: 640px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
  margin-bottom: 1.5rem;
  color: white;
  font-weight: 600;
}

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

.primary-button:hover,
.play-detail-button:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.secondary-button {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-control.prev {
  left: 1.2rem;
}

.hero-control.next {
  right: 1.2rem;
}

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

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

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

.section {
  padding: 4rem 0;
}

.section.white {
  background: white;
}

.section.soft {
  background: var(--neutral-50);
}

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

.section.dark {
  background: var(--neutral-900);
  color: white;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.22;
  font-weight: 800;
  color: var(--neutral-900);
}

.dark .section-title {
  color: white;
}

.section-note {
  margin: 0.4rem 0 0;
  color: var(--neutral-500);
  line-height: 1.65;
}

.dark .section-note {
  color: var(--neutral-300);
}

.more-link {
  color: var(--primary-600);
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 91, 179, 0.35);
  box-shadow: var(--shadow-soft);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
}

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

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

.card-badge,
.card-score {
  position: absolute;
  top: 0.75rem;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.42rem 0.62rem;
  backdrop-filter: blur(8px);
}

.card-badge {
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.58);
}

.card-score {
  right: 0.75rem;
  background: rgba(217, 119, 6, 0.92);
}

.movie-card-body {
  padding: 1rem;
}

.movie-card-title {
  display: block;
  color: var(--neutral-900);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-card-meta {
  margin: 0.35rem 0 0;
  color: var(--neutral-500);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-line {
  margin: 0.55rem 0 0;
  color: var(--neutral-600);
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.75rem;
}

.tag-row span {
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.horizontal-scroll {
  overflow-x: auto;
  padding-bottom: 0.8rem;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.horizontal-track {
  display: flex;
  gap: 1rem;
  width: max-content;
}

.horizontal-track .movie-card {
  width: 280px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  background: var(--neutral-900);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.1);
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.78));
}

.category-name,
.category-desc {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  color: white;
}

.category-name {
  bottom: 3.4rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.category-desc {
  bottom: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  font-size: 0.92rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 76px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-num {
  color: var(--accent-300);
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 76px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  display: block;
  color: white;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.rank-title:hover {
  color: var(--accent-300);
}

.rank-meta {
  margin: 0;
  color: var(--neutral-300);
  line-height: 1.5;
}

.rank-score {
  color: var(--accent-300);
  font-weight: 900;
  padding-right: 0.5rem;
}

.year-block {
  margin-top: 2rem;
}

.year-block h3 {
  color: var(--accent-300);
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.page-hero {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--neutral-600);
  line-height: 1.8;
  font-size: 1.05rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 0.75rem;
  padding: 1rem;
  margin: 0 0 1.5rem;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  background: white;
  padding: 0.78rem 0.9rem;
  outline: none;
}

.empty-state {
  display: none;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--neutral-500);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--neutral-500);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--primary-600);
}

.detail-hero {
  padding: 2rem 0 3rem;
  background: linear-gradient(135deg, var(--neutral-900), #0c2344);
  color: white;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: black;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 0;
  padding: 0;
  background: black;
  color: white;
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.62));
}

.play-large {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  background: rgba(0, 91, 179, 0.92);
  color: white;
  font-size: 2.1rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.player-cover:hover .play-large {
  background: var(--primary-700);
  transform: translate(-50%, -50%) scale(1.06);
}

.hidden-cover {
  display: none;
}

.detail-side {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.detail-side img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 1rem;
}

.detail-side h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 0.42rem 0.65rem;
  font-weight: 700;
  color: white;
  font-size: 0.82rem;
}

.detail-one-line {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.content-card {
  border: 1px solid var(--neutral-200);
  border-radius: 22px;
  background: white;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}

.content-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
}

.content-card p {
  margin: 0;
  color: var(--neutral-700);
  line-height: 1.85;
}

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

.meta-cell {
  border-radius: 16px;
  background: var(--neutral-50);
  padding: 1rem;
}

.meta-cell span {
  display: block;
  color: var(--neutral-500);
  font-size: 0.84rem;
  margin-bottom: 0.35rem;
}

.meta-cell strong {
  color: var(--neutral-900);
}

.site-footer {
  background: var(--neutral-900);
  color: var(--neutral-300);
  padding-top: 3rem;
}

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

.footer-brand {
  display: inline-block;
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.9rem;
}

.site-footer p {
  line-height: 1.7;
  margin: 0;
}

.site-footer h3 {
  margin: 0 0 0.9rem;
  color: white;
  font-size: 1.05rem;
}

.site-footer a:not(.footer-brand) {
  display: block;
  color: var(--neutral-300);
  margin: 0.45rem 0;
}

.site-footer a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  margin-top: 2.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  text-align: center;
  color: var(--neutral-500);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.2rem;
  }

  .detail-side img {
    margin-bottom: 0;
  }

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

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

@media (max-width: 760px) {
  .container-custom {
    padding: 0 0.9rem;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-slide::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.9));
  }

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

  .hero-control {
    display: none;
  }

  .section {
    padding: 3rem 0;
  }

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

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

  .movie-card-body {
    padding: 0.8rem;
  }

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

  .rank-item {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-score {
    grid-column: 3;
    padding: 0;
  }

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

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

  .detail-side {
    display: block;
  }

  .detail-side img {
    max-width: 220px;
    margin: 0 auto 1rem;
  }

  .play-large {
    width: 68px;
    height: 68px;
    font-size: 1.7rem;
  }

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