:root {
  --mist-50: #f8fafc;
  --mist-100: #f1f5f9;
  --mist-200: #e2e8f0;
  --mist-300: #cbd5e1;
  --mist-400: #94a3b8;
  --mist-500: #64748b;
  --mist-600: #475569;
  --mist-700: #334155;
  --mist-800: #1e293b;
  --mist-900: #0f172a;
  --lake-50: #f0f9ff;
  --lake-100: #e0f2fe;
  --lake-400: #38bdf8;
  --lake-600: #0284c7;
  --lake-700: #0369a1;
  --lake-900: #0c4a6e;
  --sepia-50: #faf8f5;
  --sepia-100: #f5f1ea;
  --sepia-600: #9d7d52;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--sepia-50), var(--white));
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(16px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s ease;
}

.brand:hover,
.footer-brand:hover {
  opacity: 0.82;
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--lake-600), var(--lake-400));
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.1);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
}

.brand-text small {
  margin-top: 2px;
  color: var(--mist-400);
  font-size: 12px;
}

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

.nav-link {
  color: var(--mist-200);
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--lake-400);
}

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

.menu-toggle:hover {
  background: var(--mist-800);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: var(--mist-800);
  border-top: 1px solid var(--mist-700);
}

.mobile-nav.open {
  display: grid;
}

.mobile-link {
  padding: 11px 0;
  color: var(--mist-200);
  font-size: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(90deg, var(--mist-900), var(--mist-800), var(--lake-900));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.05) contrast(1.08);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(56, 189, 248, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78) 48%, rgba(12, 74, 110, 0.44));
}

.hero-layout {
  position: relative;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 58px;
  padding: 80px 0 96px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lake-400);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 20px 0 0;
  color: var(--mist-100);
  font-size: clamp(24px, 3vw, 38px);
}

.hero-copy p,
.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--mist-200);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-row,
.category-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span,
.category-pill-list a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--lake-700);
  background: var(--lake-50);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

.hero-tags span {
  color: var(--mist-100);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--lake-600), var(--lake-400));
  box-shadow: 0 16px 35px rgba(2, 132, 199, 0.28);
}

.secondary-btn {
  color: var(--mist-900);
  background: var(--mist-100);
}

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

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4.1;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(1.5deg);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.88);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.12);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: var(--lake-400);
}

.content-section {
  padding: 74px 0;
}

.soft-section {
  background: var(--mist-50);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--mist-600);
}

.section-more {
  flex: 0 0 auto;
  color: var(--lake-600);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-elevated);
  border-color: rgba(56, 189, 248, 0.45);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: var(--mist-100);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.72));
  opacity: 0.85;
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 132, 199, 0.9);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mist-500);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--lake-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--mist-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  min-height: 26px;
}

.movie-card-compact .card-body p {
  min-height: 42px;
  font-size: 13px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 34px;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-elevated);
}

.rank-num {
  color: var(--lake-600);
  font-weight: 900;
  font-size: 20px;
  text-align: center;
}

.ranking-item img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--mist-100);
}

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ranking-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy small {
  color: var(--mist-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-panel,
.side-card,
.filter-panel,
.category-overview-card a {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.feature-panel {
  padding: 28px;
  align-self: start;
}

.feature-panel h2 {
  margin: 0 0 12px;
}

.feature-panel p {
  color: var(--mist-600);
}

.category-pill-list {
  margin-top: 20px;
}

.page-main {
  min-height: 60vh;
}

.page-hero,
.detail-hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(90deg, var(--mist-900), var(--mist-800), var(--lake-900));
  overflow: hidden;
}

.page-hero {
  padding: 82px 0;
}

.page-hero p {
  max-width: 760px;
}

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

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

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

.category-overview-card a {
  display: grid;
  min-height: 270px;
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.category-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--lake-600);
}

.category-overview-card h2 {
  margin: 18px 0 8px;
}

.category-overview-card p {
  margin: 0;
  color: var(--mist-600);
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.mini-posters img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
  background: var(--mist-100);
}

.filter-panel {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) 180px auto;
  align-items: end;
  gap: 16px;
  padding: 18px;
  margin-bottom: 30px;
}

.filter-title {
  color: var(--mist-900);
  font-weight: 900;
  padding-bottom: 10px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--mist-600);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--mist-200);
  border-radius: 12px;
  color: var(--mist-900);
  background: var(--white);
  padding: 0 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--lake-600);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

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

.detail-hero-inner {
  position: relative;
  padding: 70px 0 78px;
}

.detail-info {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: center;
  gap: 38px;
}

.detail-cover {
  width: 270px;
  aspect-ratio: 3 / 4.15;
  border-radius: 24px;
  object-fit: cover;
  background: var(--mist-100);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 790px;
  color: var(--mist-200);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  color: var(--mist-200);
}

.detail-tags {
  margin-bottom: 26px;
}

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

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.12);
  font-size: 30px;
}

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

.detail-article h2 {
  margin: 34px 0 12px;
  font-size: 26px;
}

.detail-article p {
  margin: 0;
  color: var(--mist-700);
  font-size: 17px;
}

.side-card {
  padding: 24px;
  position: sticky;
  top: 92px;
}

.side-card h2 {
  margin: 0 0 18px;
}

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

.side-card dt {
  color: var(--mist-500);
}

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

.side-card a {
  color: var(--lake-600);
}

.site-footer {
  color: var(--mist-300);
  background: var(--mist-900);
  border-top: 1px solid var(--mist-800);
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

.site-footer p {
  margin: 14px 0 0;
  color: var(--mist-300);
  font-size: 14px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--lake-400);
}

.footer-bottom {
  border-top: 1px solid var(--mist-800);
  padding: 18px 0;
  text-align: center;
  color: var(--mist-400);
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

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

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

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

  .feature-panel,
  .side-card {
    position: static;
  }

  .hero-layout {
    grid-template-columns: 1fr 280px;
  }
}

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

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

  .hero-carousel,
  .hero-layout {
    min-height: 720px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 58px 0 110px;
  }

  .hero-poster {
    width: min(260px, 82vw);
    margin: 0 auto;
  }

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

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

  .detail-info {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(260px, 80vw);
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 15px;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 38px 54px minmax(0, 1fr);
  }

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