:root {
  --fog-50: #f0f4f8;
  --fog-100: #d9e2ec;
  --fog-200: #bcccdc;
  --fog-300: #9fb3c8;
  --fog-400: #829ab1;
  --fog-500: #627d98;
  --fog-600: #486581;
  --fog-700: #334e68;
  --fog-800: #243b53;
  --fog-900: #102a43;
  --cyan-400: #38bec9;
  --cyan-500: #18a8b5;
  --cyan-600: #14919b;
  --amber-500: #d6a431;
  --text: #243b53;
  --muted: #627d98;
  --paper: rgba(255, 255, 255, 0.94);
  --radius: 22px;
  --shadow: 0 18px 48px rgba(16, 42, 67, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4f8 50%, #f8fbff 100%);
  color: var(--text);
  min-height: 100vh;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(188, 204, 220, 0.66);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fog-900);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan-500), var(--fog-700));
  color: #fff;
  box-shadow: 0 12px 28px rgba(20, 145, 155, 0.24);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  padding: 10px 14px;
  color: #475f78;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.22s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  background: var(--cyan-500);
  color: #fff;
  box-shadow: 0 10px 22px rgba(24, 168, 181, 0.22);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--fog-50);
  color: var(--fog-800);
  font-size: 24px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--fog-900);
}

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

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-shade,
.detail-hero:before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(16, 42, 67, 0.96) 0%, rgba(16, 42, 67, 0.68) 45%, rgba(16, 42, 67, 0.2) 100%),
    linear-gradient(0deg, rgba(16, 42, 67, 0.95) 0%, rgba(16, 42, 67, 0.2) 56%, rgba(16, 42, 67, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 120px 24px 108px;
  color: #fff;
}

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(24, 168, 181, 0.16);
  color: var(--cyan-400);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 780px;
  margin-top: 18px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 680px;
  margin-top: 22px;
  color: var(--fog-100);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.movie-card .tag {
  background: var(--fog-50);
  color: var(--fog-600);
}

.hero-actions,
.detail-copy .hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  color: #fff;
  box-shadow: 0 18px 34px rgba(24, 168, 181, 0.32);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.ghost-btn.dark {
  color: var(--fog-800);
  border-color: var(--fog-200);
  background: #fff;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 32px;
  backdrop-filter: blur(12px);
  transition: background 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition: all 0.22s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--cyan-400);
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
}

.compact-section {
  padding-top: 24px;
}

.intro-section {
  padding-bottom: 12px;
}

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

.inline-head {
  align-items: center;
  margin-bottom: 20px;
}

.section-head h2,
.sub-hero h1,
.detail-copy h1,
.detail-article h2,
.detail-side h2 {
  margin-top: 10px;
  color: var(--fog-900);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-link {
  color: var(--cyan-600);
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 42, 67, 0.08);
}

.lead-text {
  max-width: 820px;
  color: var(--fog-600);
  font-size: 18px;
  line-height: 1.9;
}

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

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

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

.movie-card-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(16, 42, 67, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--fog-100), var(--fog-300));
}

.movie-poster img,
.category-card img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-year,
.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(16, 42, 67, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 10px;
  bottom: 10px;
}

.poster-type {
  right: 10px;
  top: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: var(--amber-500);
}

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

.movie-card-body h3 {
  color: var(--fog-900);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin-top: 8px;
  color: var(--fog-500);
  font-size: 12px;
  line-height: 1.4;
}

.movie-one-line {
  margin-top: 10px;
  color: var(--fog-600);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.45fr);
  gap: 28px;
  align-items: start;
}

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

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

.category-card {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--fog-900);
  box-shadow: 0 12px 32px rgba(16, 42, 67, 0.1);
}

.category-card:after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(16, 42, 67, 0.95), rgba(16, 42, 67, 0.14));
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card div {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 22px;
  color: #fff;
}

.category-card h3 {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin-top: 8px;
  color: var(--fog-100);
  font-size: 13px;
  line-height: 1.7;
}

.ranking-panel,
.detail-side,
.detail-article,
.filter-bar {
  border: 1px solid rgba(188, 204, 220, 0.68);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(16, 42, 67, 0.08);
}

.ranking-panel {
  padding: 22px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 12px;
  background: var(--fog-50);
  transition: all 0.22s ease;
}

.rank-row:hover {
  background: #fff;
  transform: translateX(3px);
}

.rank-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--fog-900);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fog-900);
}

.rank-row em {
  color: var(--fog-500);
  font-size: 12px;
  font-style: normal;
}

.sub-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 190, 201, 0.32), transparent 34%),
    linear-gradient(135deg, var(--fog-900), var(--fog-700));
  color: #fff;
}

.sub-hero > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 24px;
}

.sub-hero .section-kicker {
  background: rgba(255, 255, 255, 0.12);
}

.sub-hero h1 {
  color: #fff;
  font-size: clamp(38px, 5vw, 64px);
}

.sub-hero p {
  max-width: 780px;
  margin-top: 16px;
  color: var(--fog-100);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px;
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field span {
  color: var(--fog-600);
  font-size: 12px;
  font-weight: 800;
}

.filter-field input,
.filter-field select {
  width: 100%;
  border: 1px solid var(--fog-200);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  color: var(--fog-800);
  outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(24, 168, 181, 0.12);
}

.movie-card.is-hidden {
  display: none;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  background: var(--fog-900);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px 64px;
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--fog-200);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan-400);
}

.detail-head {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  margin-top: 42px;
}

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
  background: var(--fog-800);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

.detail-copy h1 {
  color: #fff;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 760px;
  margin-top: 20px;
  color: var(--fog-100);
  font-size: 19px;
  line-height: 1.85;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 80px rgba(16, 42, 67, 0.24);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(circle at center, rgba(16, 42, 67, 0.14), rgba(0, 0, 0, 0.58));
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-mark {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 4px;
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  box-shadow: 0 18px 36px rgba(24, 168, 181, 0.36);
  font-size: 32px;
}

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

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  font-size: 26px;
}

.detail-article p {
  margin-top: 14px;
  color: var(--fog-700);
  font-size: 17px;
  line-height: 2;
}

.detail-article h2 + p + h2 {
  margin-top: 30px;
}

.detail-side dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
}

.detail-side dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--fog-100);
  padding-bottom: 12px;
}

.detail-side dt {
  color: var(--fog-500);
  font-weight: 800;
}

.detail-side dd {
  color: var(--fog-900);
  font-weight: 700;
}

.site-footer {
  margin-top: 50px;
  background: var(--fog-900);
  color: var(--fog-200);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 36px;
  padding: 46px 24px;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
}

.site-footer p {
  max-width: 560px;
  margin-top: 12px;
  color: var(--fog-300);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--fog-100);
  font-size: 13px;
  font-weight: 700;
}

.footer-links a:hover {
  background: rgba(56, 190, 201, 0.22);
  color: #fff;
}

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

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

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

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

  .hero-content {
    min-height: 68vh;
    padding-bottom: 92px;
  }

  .hero-arrow {
    display: none;
  }

  .split-section,
  .detail-layout,
  .site-footer-inner,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 260px;
  }

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

  .wide-rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    min-height: 66px;
    padding: 0 16px;
  }

  .mobile-nav {
    padding: 0 16px 16px;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content,
  .content-section,
  .sub-hero > div,
  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 38px;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-one-line {
    -webkit-line-clamp: 2;
  }

  .category-card {
    min-height: 160px;
  }

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

  .detail-section {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .detail-article,
  .detail-side {
    padding: 20px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .dense-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }
}
