:root {
  --fog-50: #f8f9fa;
  --fog-100: #f1f3f5;
  --fog-200: #e9ecef;
  --fog-300: #dee2e6;
  --fog-500: #adb5bd;
  --fog-600: #868e96;
  --fog-700: #495057;
  --fog-900: #212529;
  --steel-50: #f3f7fb;
  --steel-100: #d9e2ec;
  --steel-300: #9fb3c8;
  --steel-400: #829ab1;
  --steel-500: #627d98;
  --steel-600: #486581;
  --steel-700: #334e68;
  --steel-800: #243b53;
  --moss-50: #f2f7f2;
  --moss-100: #dce5dc;
  --moss-600: #3d663d;
  --accent-400: #fb923c;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 10px 24px rgb(36 59 83 / 0.14);
  --shadow-lg: 0 24px 60px rgb(33 37 41 / 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--fog-900);
  background: linear-gradient(180deg, var(--fog-50), #ffffff 420px);
}

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

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

button,
input,
select {
  font: inherit;
}

.container-custom {
  width: min(100% - 32px, 1408px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid var(--fog-200);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

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

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

.brand-text {
  font-size: clamp(18px, 2vw, 24px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
  box-shadow: 0 8px 22px rgb(72 101 129 / 0.25);
}

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

.nav-link,
.dropdown-trigger {
  border: 0;
  background: transparent;
  color: var(--fog-700);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--fog-200);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--fog-700);
}

.dropdown-menu a:hover,
.mobile-nav a:hover {
  background: var(--fog-50);
  color: var(--steel-600);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--fog-300);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--fog-900);
  background: white;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 260px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--steel-500);
  box-shadow: 0 0 0 3px rgb(98 125 152 / 0.18);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
  color: white;
  background: var(--steel-600);
  cursor: pointer;
}

.mobile-menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--fog-700);
  background: var(--fog-100);
}

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

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 16px 0 8px;
}

.hero {
  position: relative;
  min-height: clamp(540px, 78vh, 820px);
  overflow: hidden;
  color: white;
  background: var(--fog-900);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.03);
}

.hero-bg.is-missing,
.poster-wrap img.is-missing,
.category-card img.is-missing,
.rank-row img.is-missing,
.hero-thumb img.is-missing {
  opacity: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgb(251 146 60 / 0.26), transparent 30%),
    linear-gradient(90deg, rgb(33 37 41 / 0.92), rgb(33 37 41 / 0.68) 48%, rgb(33 37 41 / 0.28)),
    linear-gradient(0deg, var(--fog-900), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  min-height: clamp(540px, 78vh, 820px);
  padding-block: 96px 150px;
}

.hero-copy {
  width: min(760px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent-400);
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--fog-200);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.detail-meta a {
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgb(255 255 255 / 0.09);
  color: var(--fog-100);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
  box-shadow: 0 12px 28px rgb(72 101 129 / 0.32);
}

.btn-ghost {
  color: white;
  border: 1px solid rgb(255 255 255 / 0.24);
  background: rgb(255 255 255 / 0.1);
  backdrop-filter: blur(8px);
}

.hero-thumb-wrap {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 36px;
  left: 0;
}

.hero-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 56px 118px;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 16px;
  padding: 8px;
  color: var(--fog-100);
  background: rgb(255 255 255 / 0.08);
  backdrop-filter: blur(10px);
  cursor: pointer;
  text-align: left;
}

.hero-thumb.is-active {
  border-color: var(--accent-400);
  background: rgb(255 255 255 / 0.16);
}

.hero-thumb img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--steel-600), var(--fog-900));
}

.hero-thumb span {
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.content-section,
.split-section,
.category-tiles {
  padding: clamp(56px, 8vw, 96px) 0;
}

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

.content-section.section-dark .section-heading h2,
.content-section.section-dark .movie-card h3 {
  color: white;
}

.content-section.section-dark .movie-card {
  background: rgb(255 255 255 / 0.07);
}

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

.section-heading.centered {
  align-items: center;
  text-align: center;
  flex-direction: column;
}

.section-heading h2 {
  margin: 0;
  color: var(--fog-900);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--steel-600);
  font-weight: 700;
}

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

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

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

.movie-card {
  border: 1px solid var(--fog-200);
  border-radius: 18px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--steel-100);
  box-shadow: var(--shadow-md);
}

.movie-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  height: 290px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgb(251 146 60 / 0.35), transparent 28%),
    linear-gradient(135deg, var(--steel-600), var(--fog-900));
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.58), transparent);
}

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

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

.poster-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  background: rgb(36 59 83 / 0.82);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.poster-play {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--fog-900);
  background: white;
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.22);
}

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

.movie-card-topline,
.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--fog-600);
  font-size: 13px;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--fog-700);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-line,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

.horizontal-list {
  display: grid;
  gap: 16px;
}

.movie-card-horizontal .movie-link {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 170px;
}

.horizontal-poster {
  height: 100%;
}

.split-section {
  background: linear-gradient(180deg, white, var(--fog-50));
}

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

.rank-panel,
.sticky-panel,
.search-panel,
.detail-card,
.player-card {
  border: 1px solid var(--fog-200);
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.rank-panel,
.sticky-panel,
.search-panel {
  padding: 22px;
}

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

.rank-row {
  border: 1px solid var(--fog-200);
  border-radius: 14px;
  background: white;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(2px);
  border-color: var(--steel-300);
}

.rank-link {
  display: grid;
  grid-template-columns: 44px 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.rank-number {
  color: var(--accent-400);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--steel-600), var(--fog-900));
}

.rank-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-info strong,
.rank-info small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info small {
  color: var(--fog-600);
}

.rank-play {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--steel-700);
  background: var(--steel-50);
  font-size: 12px;
  font-weight: 800;
}

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

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

.category-tile,
.category-card {
  position: relative;
  display: grid;
  min-height: 168px;
  overflow: hidden;
  border-radius: 20px;
  padding: 22px;
  color: white;
  background:
    radial-gradient(circle at 82% 18%, rgb(251 146 60 / 0.28), transparent 34%),
    linear-gradient(135deg, var(--steel-600), var(--steel-800));
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile span,
.category-card strong {
  font-size: 22px;
  font-weight: 800;
}

.category-tile strong,
.category-card em {
  align-self: center;
  font-size: 34px;
  font-style: normal;
}

.category-tile small,
.category-card small {
  color: var(--fog-200);
  line-height: 1.5;
}

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

.category-card {
  min-height: 240px;
  isolation: isolate;
}

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

.category-card img {
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.category-card-overlay {
  z-index: -1;
  background: linear-gradient(135deg, rgb(36 59 83 / 0.92), rgb(33 37 41 / 0.42));
}

.page-hero,
.detail-top {
  color: white;
  background:
    radial-gradient(circle at 78% 22%, rgb(251 146 60 / 0.18), transparent 30%),
    linear-gradient(135deg, var(--steel-600), var(--steel-800));
}

.page-hero {
  padding: 72px 0 76px;
}

.compact-hero,
.search-hero,
.ranking-hero,
.category-hero {
  background:
    radial-gradient(circle at 84% 18%, rgb(251 146 60 / 0.22), transparent 28%),
    linear-gradient(135deg, var(--steel-700), var(--fog-900));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--steel-100);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

.crumb-sep {
  color: rgb(255 255 255 / 0.42);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--fog-200);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.empty-state,
.search-count {
  color: var(--fog-600);
  text-align: center;
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-count {
  margin: 16px 0 0;
}

.detail-top {
  padding: 28px 0;
}

.detail-top .breadcrumb {
  margin-bottom: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 30px;
  align-items: start;
  padding-block: 32px 48px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
}

.player-title-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  color: white;
  background: var(--fog-900);
}

.player-title-bar span {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--fog-900);
  background: var(--accent-400);
  font-size: 12px;
  font-weight: 800;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: black;
}

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

.player-start {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  color: white;
  background: rgb(72 101 129 / 0.92);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.player-start.is-hidden {
  display: none;
}

.detail-card {
  padding: clamp(22px, 4vw, 34px);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-meta {
  margin-bottom: 28px;
}

.detail-meta span,
.detail-meta a {
  border-color: var(--fog-200);
  color: var(--fog-700);
  background: var(--fog-50);
}

.detail-card section {
  margin-top: 28px;
}

.detail-card h2,
.detail-side h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-card p {
  color: var(--fog-700);
  font-size: 17px;
  line-height: 1.85;
}

.lead-text {
  color: var(--fog-900) !important;
  font-weight: 700;
}

.review-box {
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(135deg, var(--moss-50), var(--fog-50));
}

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

.sticky-panel {
  position: sticky;
  top: 100px;
}

.sticky-panel .movie-card-horizontal .movie-link {
  grid-template-columns: 116px 1fr;
  min-height: 138px;
}

.sticky-panel .movie-card h3 {
  font-size: 15px;
  min-height: auto;
}

.sticky-panel .movie-card p {
  font-size: 13px;
  min-height: auto;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 52px 0;
}

.footer-brand {
  margin-bottom: 16px;
  color: white;
  font-size: 22px;
}

.footer-about p,
.site-footer li,
.site-footer p {
  color: var(--fog-500);
  line-height: 1.7;
}

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

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--steel-300);
}

.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 0.08);
  padding: 18px;
  text-align: center;
}

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

  .mobile-menu-toggle {
    display: inline-flex;
  }

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

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

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .container-custom {
    width: min(100% - 24px, 1408px);
  }

  .header-inner {
    min-height: 64px;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding-block: 88px 178px;
  }

  .movie-grid,
  .movie-grid.two-col,
  .movie-grid.three-col,
  .full-rank,
  .category-grid,
  .category-grid.large,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .movie-link,
  .sticky-panel .movie-card-horizontal .movie-link {
    grid-template-columns: 132px 1fr;
  }

  .poster-wrap {
    height: 260px;
  }

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

  .rank-link {
    grid-template-columns: 38px 48px 1fr;
  }

  .rank-play {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-text {
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-meta span {
    font-size: 13px;
  }

  .hero-thumb {
    grid-template-columns: 48px 104px;
    min-width: 170px;
  }

  .movie-card-horizontal .movie-link,
  .sticky-panel .movie-card-horizontal .movie-link {
    grid-template-columns: 1fr;
  }

  .horizontal-poster {
    height: 220px;
  }

  .poster-wrap {
    height: 240px;
  }
}
