:root {
  --primary-950: #082f49;
  --primary-900: #0c4a6e;
  --primary-800: #075985;
  --primary-700: #0369a1;
  --primary-600: #0284c7;
  --primary-500: #0ea5e9;
  --primary-100: #e0f2fe;
  --primary-50: #f0f9ff;
  --accent-600: #d97706;
  --accent-500: #f59e0b;
  --accent-400: #fbbf24;
  --accent-100: #fef3c7;
  --accent-50: #fffbeb;
  --neutral-950: #0c0a09;
  --neutral-900: #1c1917;
  --neutral-800: #292524;
  --neutral-700: #44403c;
  --neutral-600: #57534e;
  --neutral-500: #78716c;
  --neutral-300: #d6d3d1;
  --neutral-200: #e7e5e4;
  --neutral-100: #f5f5f4;
  --neutral-50: #fafaf9;
  --white: #ffffff;
  --shadow-md: 0 10px 22px rgba(12, 10, 9, 0.08);
  --shadow-xl: 0 24px 60px rgba(12, 10, 9, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-500);
  color: var(--primary-950);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--accent-400);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 600;
}

.mobile-nav.is-open {
  display: flex;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--primary-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 44px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.34;
}

.hero-shade {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(8, 47, 73, 0.96), rgba(7, 89, 133, 0.78) 48%, rgba(12, 10, 9, 0.72));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-400);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-info p {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent-500);
  color: var(--primary-950);
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

.btn-accent:hover {
  background: var(--accent-400);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.hero-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-800), var(--accent-500));
  box-shadow: var(--shadow-xl);
}

.hero-poster img,
.poster img,
.detail-poster img,
.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.hero-poster:hover img,
.movie-card:hover .poster img,
.ranking-row:hover .ranking-cover img {
  transform: scale(1.05);
}

img.is-hidden {
  opacity: 0;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 24px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--accent-400);
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.search-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--neutral-900);
  font-size: 22px;
}

.search-panel p,
.section-heading p,
.movie-card p,
.category-card p,
.category-overview-card p,
.rank-panel p,
.text-panel p,
.ranking-info p,
.footer-inner p {
  color: var(--neutral-600);
}

.search-form,
.filter-bar {
  display: flex;
  gap: 12px;
}

.search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  background: var(--neutral-50);
  color: var(--neutral-900);
  padding: 0 14px;
  outline: none;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.search-form button {
  min-width: 104px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-600);
  color: var(--white);
  font-weight: 800;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--neutral-900);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.section-heading p {
  margin: 6px 0 0;
}

.section-link {
  color: var(--primary-700);
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.movie-card,
.rank-panel,
.side-card,
.text-panel,
.ranking-row {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.category-card {
  min-height: 178px;
  padding: 22px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.category-glow {
  position: absolute;
  top: -42px;
  right: -42px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.16);
}

.category-card strong,
.category-main-link {
  position: relative;
  display: block;
  color: var(--neutral-900);
  font-size: 20px;
  font-weight: 850;
}

.category-card p,
.category-overview-card p {
  position: relative;
  margin: 12px 0;
}

.category-card > span:last-child {
  position: relative;
  color: var(--primary-700);
  font-size: 14px;
  font-weight: 800;
}

.alt-section {
  background: linear-gradient(180deg, var(--primary-50), var(--neutral-50));
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.category-card:hover,
.ranking-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.86), transparent);
}

.score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-500);
  color: var(--primary-950);
  font-size: 13px;
  font-weight: 850;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.movie-title {
  color: var(--neutral-900);
  font-weight: 850;
  line-height: 1.35;
}

.movie-title:hover,
.ranking-title:hover,
.category-main-link:hover,
.related-links a:hover,
.mini-links a:hover,
.nav-neighbor a:hover {
  color: var(--primary-700);
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  min-height: 22px;
  background: var(--neutral-100);
  color: var(--neutral-600);
  font-size: 12px;
}

.movie-card p {
  margin: 0;
  font-size: 14px;
}

.tag-row span {
  min-height: 23px;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 12px;
}

.rank-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.rank-panel h2,
.side-card h2,
.text-panel h2 {
  margin: 0 0 10px;
  color: var(--neutral-900);
  font-size: 22px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--neutral-50);
}

.rank-no {
  color: var(--accent-600);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  color: var(--neutral-800);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-heat {
  color: var(--primary-700);
  font-weight: 850;
  text-align: right;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
  color: var(--white);
}

.simple-hero,
.category-hero {
  padding: 64px 0;
}

.page-hero:before,
.detail-hero:before {
  content: "";
  position: absolute;
  inset: -40% auto auto 55%;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
  filter: blur(10px);
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumbs a:after {
  content: "/";
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.45);
}

.filter-bar {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.empty-state {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--neutral-600);
  text-align: center;
}

.category-overview-card {
  min-height: 220px;
  padding: 24px;
}

.mini-links,
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mini-links a,
.related-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 700;
}

.ranking-list-page {
  display: grid;
  gap: 14px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 70px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px 12px 12px;
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-800), var(--accent-500));
}

.ranking-title {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--neutral-900);
  font-size: 19px;
  font-weight: 850;
}

.ranking-title span {
  color: var(--accent-600);
  font-size: 14px;
}

.ranking-info p {
  margin: 6px 0 10px;
}

.ranking-score {
  color: var(--primary-700);
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  min-height: 560px;
  padding: 58px 0;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(16px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.36;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 47, 73, 0.97), rgba(7, 89, 133, 0.78), rgba(12, 10, 9, 0.74));
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  background: linear-gradient(135deg, var(--primary-800), var(--accent-500));
  box-shadow: var(--shadow-xl);
}

.detail-meta {
  margin-top: 18px;
}

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

.main-detail,
.side-detail {
  display: grid;
  gap: 20px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.82), rgba(12, 10, 9, 0.9));
  color: var(--white);
  text-align: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-500);
  color: var(--primary-950);
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.3);
}

.player-cover strong {
  font-size: 24px;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 3;
  margin: 0;
  color: var(--white);
  text-align: center;
}

.text-panel {
  padding: 24px;
}

.text-panel p {
  margin: 0;
  color: var(--neutral-700);
  white-space: pre-line;
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--neutral-500);
  font-weight: 700;
}

.side-card dd {
  margin: 0;
  color: var(--neutral-900);
  font-weight: 700;
}

.nav-neighbor {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
}

.nav-neighbor a {
  color: var(--primary-700);
  font-weight: 800;
}

.site-footer {
  margin-top: 28px;
  background: var(--neutral-900);
  color: var(--neutral-300);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 12px;
}

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

.footer-links strong {
  color: var(--white);
  margin-bottom: 4px;
}

.footer-links a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  border-top: 1px solid var(--neutral-800);
  padding: 16px;
  color: var(--neutral-500);
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

  .rank-panel {
    position: static;
  }
}

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

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

  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 46px 0 84px;
  }

  .hero-poster {
    width: min(260px, 76vw);
    justify-self: center;
  }

  .search-panel,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .filter-bar,
  .search-form {
    flex-direction: column;
  }

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

  .ranking-score {
    grid-column: 2;
    text-align: left;
  }

  .detail-poster {
    width: min(260px, 74vw);
  }
}

@media (max-width: 520px) {
  .container,
  .nav-wrap,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-content p,
  .page-hero p,
  .detail-info p {
    font-size: 16px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
