: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-50: #e0fcff;
  --cyan-100: #bef8fd;
  --cyan-400: #38bec9;
  --cyan-500: #2cb1bc;
  --cyan-600: #14919b;
  --cyan-700: #0e7c86;
  --white: #ffffff;
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-strong: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fog-50);
  color: var(--fog-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand.compact {
  color: #ffffff;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-700));
  box-shadow: var(--shadow-soft);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #ffffff;
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link {
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--fog-700);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  background: var(--fog-100);
  color: var(--fog-900);
}

.nav-link.active {
  background: var(--cyan-500);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--fog-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--fog-700);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  gap: 8px;
  flex-direction: column;
}

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

main {
  min-height: 60vh;
}

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 42, 67, 0.98), rgba(16, 42, 67, 0.62) 48%, rgba(16, 42, 67, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 0 0 92px;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
  animation: fadeIn 0.58s ease both;
}

.eyebrow {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--cyan-500);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  background: var(--cyan-50);
  color: var(--cyan-700);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-desc {
  margin: 0 0 22px;
  max-width: 660px;
  color: var(--fog-100);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--fog-100);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--fog-100);
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: var(--cyan-500);
  color: #ffffff;
  box-shadow: var(--shadow-medium);
}

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

.ghost-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(14px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

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

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

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

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

.content-section.alt {
  width: 100%;
  max-width: none;
  padding: 70px max(16px, calc((100% - 1180px) / 2));
  background: #ffffff;
}

.intro-search {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
}

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

.section-heading.wide {
  display: block;
  max-width: 760px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--fog-800);
  font-size: clamp(28px, 3.3vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--fog-600);
  font-size: 17px;
}

.section-heading a {
  color: var(--cyan-700);
  font-weight: 800;
}

.quick-actions {
  display: grid;
  gap: 12px;
}

.quick-actions a {
  border-radius: 16px;
  padding: 18px 20px;
  background: #ffffff;
  color: var(--fog-800);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-actions a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

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

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

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

.movie-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.movie-link:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}

.movie-link:hover .poster-shade {
  background: rgba(0, 0, 0, 0.38);
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-link:hover .play-mark {
  opacity: 1;
  transform: scale(1);
}

.year-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.year-pill {
  right: 10px;
}

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

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

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

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

.card-desc {
  color: var(--fog-600);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body .tag-row span {
  background: var(--fog-100);
  color: var(--fog-700);
}

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

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

.category-card,
.category-large-card a {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  gap: 12px;
  border-radius: 22px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-large-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.category-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--cyan-50);
  color: var(--cyan-700);
  font-weight: 900;
}

.category-icon.large {
  width: 64px;
  height: 64px;
}

.category-card strong,
.category-large-card h2 {
  margin: 0;
  color: var(--fog-800);
  font-size: 21px;
}

.category-card em,
.category-large-card p {
  color: var(--fog-600);
  font-size: 14px;
  font-style: normal;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.mini-links a,
.open-link {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--fog-100);
  color: var(--fog-700);
  font-size: 12px;
  font-weight: 700;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--fog-800), var(--fog-900));
}

.compact-hero {
  padding: 72px max(16px, calc((100% - 1180px) / 2));
}

.compact-hero h1,
.compact-hero p:not(.eyebrow) {
  color: #ffffff;
}

.compact-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--fog-200);
}

.category-hero {
  background: radial-gradient(circle at 18% 20%, rgba(44, 177, 188, 0.58), transparent 32%), linear-gradient(135deg, var(--fog-800), var(--fog-900));
}

.ranking-hero {
  background: radial-gradient(circle at 82% 18%, rgba(44, 177, 188, 0.45), transparent 30%), linear-gradient(135deg, var(--fog-900), var(--fog-700));
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  border-radius: 22px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 0 16px;
  background: var(--fog-50);
}

.search-box span {
  color: var(--cyan-700);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fog-800);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 10px 13px;
  background: var(--fog-100);
  color: var(--fog-700);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--cyan-500);
  color: #ffffff;
}

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

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

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

.breadcrumb.inverse {
  color: var(--fog-200);
}

.breadcrumb.inverse a {
  color: var(--cyan-100);
}

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

.detail-bg,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-bg {
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.06);
  transform: scale(1.08);
  opacity: 0.48;
}

.detail-overlay {
  background: linear-gradient(0deg, rgba(16, 42, 67, 0.98), rgba(16, 42, 67, 0.70));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
}

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

.detail-copy {
  color: #ffffff;
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(36px, 6vw, 68px);
}

.detail-one-line {
  max-width: 760px;
  margin: 18px 0 22px;
  color: var(--fog-100);
  font-size: 20px;
}

.player-section {
  padding-top: 48px;
}

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

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  object-fit: cover;
}

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

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  background: var(--cyan-500);
  color: #ffffff;
  font-size: 42px;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-strong);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 0;
}

.detail-card {
  border-radius: 22px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-card h2 {
  margin: 0 0 14px;
  color: var(--fog-800);
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: var(--fog-700);
  font-size: 16px;
}

.meta-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-card div {
  border-radius: 14px;
  padding: 14px;
  background: var(--fog-50);
}

.meta-card dt {
  color: var(--fog-500);
  font-size: 12px;
  font-weight: 800;
}

.meta-card dd {
  margin: 4px 0 0;
  color: var(--fog-800);
  font-weight: 800;
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.prev-next a {
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  color: var(--fog-800);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prev-next a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

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

.footer-brand p {
  max-width: 420px;
  color: var(--fog-300);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

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

.footer-links a {
  color: var(--fog-300);
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 18px;
  color: var(--fog-400);
  text-align: center;
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .movie-grid,
  .all-grid,
  .category-movie-grid,
  .ranking-list,
  .ranking-page-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .all-grid,
  .category-movie-grid,
  .ranking-list,
  .ranking-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prev-next,
  .meta-card dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-carousel {
    height: 78vh;
    min-height: 560px;
  }

  .hero-copy h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-desc,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .detail-meta,
  .filter-chips {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn,
  .filter-chip {
    width: 100%;
  }

  .content-section,
  .content-section.alt {
    padding-top: 46px;
    padding-bottom: 46px;
  }

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

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