:root {
  --fog-50: #f0f4f8;
  --fog-100: #d9e2ec;
  --fog-200: #bcccdc;
  --fog-300: #9fb3c8;
  --fog-600: #486581;
  --fog-700: #334e68;
  --fog-800: #243b53;
  --fog-900: #102a43;
  --mist-50: #f8fafc;
  --mist-600: #495057;
  --cyan-400: #38bec9;
  --cyan-500: #1fb6c3;
  --cyan-600: #14919b;
  --amber-500: #c99a2e;
  --white: #ffffff;
  --shadow-soft: 0 4px 14px rgba(16, 42, 67, 0.08);
  --shadow-medium: 0 12px 28px rgba(16, 42, 67, 0.12);
  --shadow-strong: 0 22px 42px rgba(16, 42, 67, 0.18);
  color-scheme: light;
}

body {
  min-height: 100vh;
  background: var(--mist-50);
  color: var(--fog-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.nav-wrap {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fog-800);
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-600));
  box-shadow: 0 8px 18px rgba(20, 145, 155, 0.28);
  font-size: 13px;
}

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

.desktop-nav a,
.mobile-menu a {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--mist-600);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.desktop-nav a.active {
  color: var(--white);
  background: var(--cyan-500);
  box-shadow: var(--shadow-soft);
}

.header-search {
  position: relative;
  margin-left: auto;
  width: min(280px, 32vw);
}

.header-search input,
.local-filter input {
  width: 100%;
  border: 1px solid var(--fog-200);
  border-radius: 999px;
  background: rgba(240, 244, 248, 0.86);
  color: var(--fog-800);
  padding: 10px 16px;
  outline: none;
  transition: all 0.2s ease;
}

.header-search input:focus,
.local-filter input:focus {
  border-color: var(--cyan-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(31, 182, 195, 0.14);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 420px;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--fog-100);
  border-radius: 16px;
  box-shadow: var(--shadow-strong);
  padding: 8px;
}

.global-search-results.is-open {
  display: block;
}

.search-hit {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  color: var(--fog-800);
}

.search-hit:hover {
  background: var(--fog-50);
}

.search-hit img {
  width: 46px;
  height: 62px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--fog-200);
}

.search-hit strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.search-hit small {
  color: var(--fog-600);
}

.menu-toggle {
  display: none;
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--fog-800);
  background: var(--fog-50);
  font-weight: 700;
}

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--fog-900) 0%, rgba(16, 42, 67, 0.68) 48%, rgba(16, 42, 67, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 88px;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  max-width: 680px;
  animation: fadeIn 0.6s ease both;
}

.hero-label,
.page-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: var(--white);
  background: var(--cyan-500);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  color: var(--white);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.hero-copy p {
  color: var(--fog-100);
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 22px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--fog-200);
  margin-bottom: 30px;
}

.hero-meta span,
.info-pill,
.tag-row span,
.detail-tags span,
.filter-buttons button {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--cyan-500);
  box-shadow: var(--shadow-medium);
}

.primary-button:hover {
  background: var(--cyan-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.secondary-button {
  color: var(--fog-800);
  background: var(--white);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  transform: translateY(-50%);
  font-size: 28px;
  transition: all 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.5);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: all 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--white);
}

.section-wrap,
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  color: var(--fog-800);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
  color: var(--fog-600);
  margin-top: 8px;
  line-height: 1.8;
}

.section-link {
  color: var(--cyan-600);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: all 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--fog-200);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(16, 42, 67, 0.78), transparent);
}

.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  font-size: 12px;
  font-weight: 800;
}

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

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 13px;
}

.card-body strong {
  color: var(--fog-800);
  font-size: 15px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-body small,
.card-body em {
  color: var(--fog-600);
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.card-body em {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag-row span,
.detail-tags span {
  background: var(--fog-50);
  color: var(--cyan-600);
}

.alt-section {
  background: var(--fog-50);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  border-radius: 20px;
  background: var(--fog-900);
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transition: transform 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span {
  position: relative;
  z-index: 2;
  display: block;
  padding: 22px;
  color: var(--white);
}

.category-card strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.category-card small {
  color: var(--fog-100);
  line-height: 1.7;
}

.rank-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 66px 1fr;
  gap: 13px;
  align-items: center;
  padding: 10px;
  border-radius: 15px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), #e7bf57);
  font-weight: 900;
}

.rank-item img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--fog-200);
}

.rank-item strong {
  display: block;
  color: var(--fog-800);
  font-weight: 800;
  margin-bottom: 6px;
}

.rank-item small {
  color: var(--fog-600);
  line-height: 1.6;
}

.page-hero {
  background: radial-gradient(circle at top left, rgba(56, 190, 201, 0.22), transparent 38%), linear-gradient(135deg, var(--fog-900), var(--fog-700));
  color: var(--white);
}

.page-hero .page-wrap {
  padding-top: 74px;
  padding-bottom: 74px;
}

.page-hero h1,
.page-hero p {
  color: var(--white);
}

.local-filter {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.filter-buttons button {
  color: var(--fog-700);
  background: var(--fog-50);
  transition: all 0.2s ease;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: var(--white);
  background: var(--cyan-500);
}

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

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

.breadcrumb a {
  color: var(--cyan-600);
  font-weight: 700;
}

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

.player-panel {
  overflow: hidden;
  border-radius: 24px;
  background: var(--fog-900);
  box-shadow: var(--shadow-strong);
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(16, 42, 67, 0.16), rgba(0, 0, 0, 0.5));
  transition: opacity 0.2s ease;
}

.movie-player.playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  color: var(--white);
  background: var(--cyan-500);
  box-shadow: var(--shadow-strong);
  font-size: 34px;
  transition: all 0.2s ease;
}

.play-button:hover {
  transform: scale(1.07);
  background: var(--cyan-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 32px;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background: var(--fog-200);
  box-shadow: var(--shadow-medium);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-title {
  margin: 26px 0 18px;
}

.info-panel,
.story-panel {
  padding: 24px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.info-panel {
  display: grid;
  gap: 16px;
}

.info-row {
  color: var(--fog-700);
}

.info-pill {
  color: var(--fog-700);
  background: var(--fog-50);
}

.story-panel h2 {
  color: var(--fog-800);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}

.story-panel p {
  color: var(--fog-700);
  line-height: 1.95;
  margin-bottom: 18px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.site-footer {
  background: var(--fog-900);
  color: var(--fog-100);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 50px 24px 30px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}

.site-footer h2 {
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
}

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

.footer-brand {
  color: var(--white);
}

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

.footer-links a {
  color: var(--fog-300);
  transition: color 0.2s ease;
}

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

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 36px;
  color: var(--fog-300);
  font-size: 13px;
}

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

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

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

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

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

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

  .header-search {
    width: 100%;
    max-width: 320px;
  }

  .nav-wrap {
    gap: 12px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

@media (max-width: 640px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .brand {
    width: calc(100% - 72px);
  }

  .header-search {
    order: 3;
    max-width: none;
  }

  .hero-slider {
    min-height: 620px;
    height: 76vh;
  }

  .hero-content {
    padding: 0 18px 78px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .section-wrap,
  .page-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

  .rank-item {
    grid-template-columns: 36px 56px 1fr;
  }

  .rank-item img {
    width: 56px;
    height: 76px;
  }

  .play-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

  .info-panel,
  .story-panel {
    padding: 18px;
  }
}
