:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --amber-400: #f59e0b;
  --rose-500: #f43f5e;
  --white: #ffffff;
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.11);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50), #ffffff 36%, #eef6ff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-900) 48%, var(--slate-800));
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-600), #8b5cf6);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.18);
  font-size: 14px;
}

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

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 99px;
  background: var(--blue-500);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--white);
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 74% 30%, rgba(37, 99, 235, 0.42), transparent 32%), linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.2));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.hero h1,
.hero h2 {
  max-width: 780px;
  margin: 22px 0 16px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

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

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

.button-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), #4f46e5);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.32);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(37, 99, 235, 0.4);
}

.button-secondary,
.hero-link {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.button-secondary:hover,
.hero-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

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

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 24px;
}

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

.hero-dot.is-active {
  width: 34px;
  opacity: 1;
  background: var(--white);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-main {
  padding: 56px 0 72px;
}

.page-main {
  padding: 42px 0 72px;
}

.page-hero {
  margin-bottom: 32px;
  padding: 36px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: radial-gradient(circle at 92% 16%, rgba(96, 165, 250, 0.42), transparent 34%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
  box-shadow: var(--shadow-lg);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.section {
  margin-bottom: 58px;
}

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

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

.section-heading p {
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.65;
}

.section-more {
  color: var(--blue-700);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow-md);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

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

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 44px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, #fde68a, var(--amber-400));
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.card-meta {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-card strong {
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-desc {
  min-height: 46px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue-700);
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 26px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--blue-700));
  box-shadow: var(--shadow-md);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -46px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
}

.category-card span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 62px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.rank-num {
  color: var(--blue-700);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-card img {
  width: 86px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-800);
}

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

.rank-info strong {
  font-size: 17px;
}

.rank-info span {
  color: var(--slate-500);
  font-size: 14px;
}

.rank-score {
  padding: 6px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 900;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.search-panel input {
  width: 100%;
  height: 48px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.search-panel select {
  min-width: 160px;
  height: 48px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 0 12px;
  background: var(--white);
}

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

.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--white);
  background: #000000;
  cursor: pointer;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.play-button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-600), #4f46e5);
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.38);
}

.detail-content {
  padding: 28px;
}

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

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

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-size: 14px;
  font-weight: 800;
}

.article-text h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.article-text p {
  margin: 0 0 18px;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.9;
}

.side-card {
  padding: 20px;
}

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

.side-related {
  display: grid;
  gap: 14px;
}

.side-related a {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.side-related img {
  width: 84px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-800);
}

.side-related strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.side-related span {
  color: var(--slate-500);
  font-size: 13px;
}

.footer {
  padding: 34px 16px 42px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--slate-950);
  text-align: center;
}

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

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

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

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

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

  .menu-button {
    display: block;
  }

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

  .hero-content {
    bottom: 88px;
  }

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

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

  .rank-card {
    grid-template-columns: 48px 74px 1fr;
  }

  .rank-score {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 19px;
  }

  .hero h1,
  .hero h2 {
    font-size: 40px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button-primary,
  .button-secondary,
  .hero-link {
    width: 100%;
  }

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

  .page-hero,
  .detail-content {
    padding: 22px;
  }

  .side-related a {
    grid-template-columns: 74px 1fr;
  }
}
