:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --blue-600: #2563eb;
  --orange-600: #ea580c;
  --pink-600: #db2777;
  --violet-600: #7c3aed;
  --cyan-600: #0891b2;
  --amber-500: #f59e0b;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.10);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--slate-100) 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.22);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-500), var(--blue-600));
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.16);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.18);
}

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

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 2px;
}

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

.mobile-logo {
  margin: 8px 0 12px;
  font-weight: 800;
  color: #ffffff;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.mobile-link:hover,
.mobile-link.is-active {
  background: rgba(16, 185, 129, 0.18);
  color: #ffffff;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: linear-gradient(120deg, var(--slate-950), var(--slate-800));
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(16, 185, 129, 0.30), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.70) 45%, rgba(15, 23, 42, 0.20)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 64px 0;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--emerald-500);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  max-width: 820px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

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

.btn-primary,
.btn-ghost,
.quick-search-form button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  min-height: 48px;
  padding: 0 26px;
  color: #ffffff;
  background: var(--emerald-500);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.24);
}

.btn-primary:hover,
.quick-search-form button:hover {
  transform: translateY(-2px);
  background: var(--emerald-600);
}

.btn-ghost {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 66px;
  background: var(--emerald-500);
}

.page-stack {
  padding: 56px 0 72px;
}

.quick-search,
.filter-panel,
.detail-card,
.player-card,
.section-block,
.site-footer {
  border-radius: var(--radius-xl);
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 24px;
  align-items: center;
  margin-bottom: 48px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.quick-search h2,
.section-head h2,
.page-hero h1 {
  margin: 0;
  color: var(--slate-800);
}

.quick-search p,
.section-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.quick-search-form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
}

.quick-search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 16px;
  background: transparent;
  outline: none;
}

.quick-search-form button {
  border: 0;
  padding: 0 22px;
  color: #ffffff;
  background: var(--emerald-500);
  cursor: pointer;
}

.section-block {
  margin-bottom: 56px;
}

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

.section-kicker {
  width: 36px;
  height: 36px;
  padding: 0;
  margin-bottom: 10px;
  font-size: 16px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-link {
  min-height: 40px;
  padding: 0 16px;
  color: var(--emerald-600);
  background: var(--emerald-50);
}

.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.14);
}

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

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

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  overflow: hidden;
  background: var(--slate-200);
}

.card-cover-small {
  aspect-ratio: 4 / 3;
}

.card-cover-medium {
  aspect-ratio: 16 / 9;
}

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

.card-link:hover .card-cover img {
  transform: scale(1.06);
}

.quality-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.quality-badge {
  right: 12px;
  padding: 5px 10px;
  background: var(--emerald-500);
}

.rank-badge {
  left: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange-600), var(--amber-500));
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.22);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.56);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.card-link:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  min-height: 52px;
  margin: 0 0 10px;
  color: var(--slate-800);
  font-size: 18px;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--emerald-600);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
}

.card-meta,
.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
}

.card-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
}

.card-foot span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--emerald-600);
  background: var(--emerald-50);
  font-weight: 800;
}

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

.category-grid-large {
  gap: 24px;
}

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: #ffffff;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.18);
}

.category-tile span {
  position: relative;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  position: relative;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.tone-emerald { background: linear-gradient(135deg, #059669, #10b981); }
.tone-blue { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.tone-violet { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.tone-slate { background: linear-gradient(135deg, #0f172a, #475569); }
.tone-pink { background: linear-gradient(135deg, #be185d, #ec4899); }
.tone-orange { background: linear-gradient(135deg, #c2410c, #f97316); }
.tone-cyan { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.tone-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.28), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero-blue {
  background:
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.35), transparent 30%),
    linear-gradient(135deg, var(--slate-950), #1e3a8a);
}

.page-hero-orange {
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
    linear-gradient(135deg, var(--slate-950), #7c2d12);
}

.page-hero-emerald { background: linear-gradient(135deg, #064e3b, #059669); }
.page-hero-violet { background: linear-gradient(135deg, #2e1065, #7c3aed); }
.page-hero-slate { background: linear-gradient(135deg, #020617, #475569); }
.page-hero-pink { background: linear-gradient(135deg, #831843, #db2777); }
.page-hero-cyan { background: linear-gradient(135deg, #164e63, #0891b2); }
.page-hero-amber { background: linear-gradient(135deg, #78350f, #f59e0b); }

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(160px, 220px));
  gap: 14px;
  margin-bottom: 30px;
  padding: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 800;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.detail-page {
  padding: 32px 0 72px;
}

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

.breadcrumb a:hover {
  color: var(--emerald-600);
}

.player-card {
  margin-bottom: 28px;
  overflow: hidden;
  background: var(--slate-950);
  box-shadow: var(--shadow-soft);
}

.player-shell {
  position: relative;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.30));
  cursor: pointer;
}

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

.player-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.36);
  font-size: 28px;
  transform: translateX(2px);
}

.detail-card {
  margin-bottom: 42px;
  padding: 30px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.detail-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-bottom: 28px;
}

.detail-head img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.detail-head h1 {
  margin: 0 0 18px;
  color: var(--slate-800);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.detail-meta span {
  color: var(--emerald-600);
  background: var(--emerald-50);
}

.tag-list {
  margin-top: 16px;
}

.tag-list span {
  color: var(--slate-600);
  background: var(--slate-100);
}

.detail-section {
  border-top: 1px solid var(--slate-200);
  padding-top: 22px;
  margin-top: 22px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: var(--slate-800);
  font-size: 22px;
}

.detail-section p,
.review-box {
  margin: 0;
  color: var(--slate-600);
  font-size: 16px;
  line-height: 1.9;
}

.lead-text {
  color: var(--slate-700) !important;
  font-size: 18px !important;
  font-weight: 700;
}

.review-box {
  padding: 20px;
  border-radius: 16px;
  background: var(--slate-50);
}

.related-block {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 20px;
  padding: 40px 0 0;
  color: rgba(255, 255, 255, 0.78);
  background: var(--slate-950);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 34px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 20px;
}

.footer-grid p {
  max-width: 560px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.24);
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
}

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

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

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

  .mobile-toggle {
    display: block;
  }

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

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

  .quick-search,
  .footer-grid,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .quick-search {
    display: block;
  }

  .quick-search-form {
    margin-top: 18px;
  }

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

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

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

  .detail-head img {
    max-width: 240px;
  }

  .detail-card {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-shell,
  .mobile-menu {
    width: min(100% - 22px, 1180px);
  }

  .nav-shell {
    height: 64px;
  }

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

  .hero-content {
    padding: 42px 0 72px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

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

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

  .hero-dots {
    bottom: 18px;
  }

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

  .card-body h3,
  .card-body p {
    min-height: auto;
  }

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

  .player-button {
    width: 70px;
    height: 70px;
  }
}
