:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --accent-500: #8b5cf6;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-500: #737373;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.10);
  --shadow-hover: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--neutral-800);
  background: linear-gradient(180deg, var(--neutral-50) 0%, #ffffff 48%, var(--primary-50) 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 22px;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.35);
}

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

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

.nav-link,
.mobile-nav-link {
  color: var(--neutral-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary-600);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.inline-search input,
.search-box-large input {
  border: 1px solid var(--neutral-300);
  border-radius: 999px;
  padding: 10px 16px;
  min-width: 220px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.inline-search input:focus,
.search-box-large input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.header-search button,
.mobile-search button,
.inline-search button,
.search-box-large button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--primary-600);
  cursor: pointer;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--primary-50);
}

.menu-button span {
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary-700);
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--neutral-200);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 30% 20%, rgba(96, 165, 250, 0.55), transparent 35%), linear-gradient(135deg, #111827, #1d4ed8 55%, #7c3aed);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.hero-bg img.image-missing {
  opacity: 0;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.20) 100%),
    radial-gradient(circle at 78% 30%, rgba(59, 130, 246, 0.38), transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 124px 22px 120px;
}

.hero h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #bfdbfe;
}

.hero-actions,
.detail-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

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

.primary-button {
  padding: 13px 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.primary-button.full {
  width: 100%;
}

.ghost-button {
  padding: 12px 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-button.dark {
  color: var(--neutral-800);
  border-color: var(--neutral-200);
  background: #ffffff;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 30px;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.quick-categories,
.content-section,
.page-main,
.site-footer .footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.quick-categories,
.content-section {
  padding-top: 64px;
}

.page-main {
  padding-top: 30px;
  padding-bottom: 80px;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-header h1 {
  margin: 6px 0 0;
  color: var(--neutral-900);
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading p,
.page-hero p,
.detail-one-line,
.player-header p {
  color: var(--neutral-500);
  line-height: 1.8;
}

.section-more {
  flex: none;
  padding: 10px 18px;
  color: var(--primary-700);
  background: var(--primary-50);
}

.category-pill-grid,
.category-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-pill,
.category-card,
.detail-main-card,
.detail-side-card,
.ranking-panel,
.video-shell {
  border: 1px solid rgba(229, 229, 229, 0.84);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.category-pill {
  display: grid;
  gap: 8px;
  padding: 20px;
  min-height: 138px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-pill:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.category-pill strong {
  color: var(--neutral-900);
  font-size: 18px;
}

.category-pill span,
.category-card p {
  color: var(--neutral-500);
  line-height: 1.65;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(229, 229, 229, 0.88);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cover-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 35% 25%, rgba(96, 165, 250, 0.48), transparent 30%),
    linear-gradient(135deg, #1e3a8a, #6d28d9);
}

.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.cover-frame img.image-missing {
  opacity: 0;
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
}

.cover-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.cover-meta {
  left: 12px;
  bottom: 12px;
  padding: 6px 9px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-title {
  color: var(--neutral-900);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card p {
  min-height: 54px;
  margin: 0;
  color: var(--neutral-500);
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.card-actions {
  justify-content: space-between;
  padding-top: 2px;
}

.card-actions a {
  color: var(--primary-600);
  font-weight: 800;
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.panel-heading h2 {
  margin: 4px 0 18px;
  font-size: 30px;
}

.ranking-list {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.ranking-list a:hover {
  background: var(--primary-50);
}

.ranking-list span {
  color: var(--primary-600);
  font-weight: 900;
}

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

.ranking-list em {
  color: var(--neutral-500);
  font-style: normal;
  font-size: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--neutral-500);
  font-size: 14px;
}

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

.breadcrumb em {
  color: var(--neutral-300);
  font-style: normal;
}

.page-hero {
  margin-bottom: 34px;
  padding: 42px;
  border-radius: 32px;
  color: var(--neutral-900);
  background:
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.22), transparent 34%),
    linear-gradient(135deg, #ffffff, var(--primary-50));
  box-shadow: var(--shadow-soft);
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.inline-search,
.search-box-large {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.search-box-large input {
  width: min(520px, 100%);
}

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

.category-card {
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card h2 {
  margin: 8px 0 10px;
  font-size: 30px;
}

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-preview-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 34px;
  padding: 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.18), transparent 36%),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.large-cover {
  width: 100%;
  border-radius: 26px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.20);
}

.detail-info h1,
.player-header h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.detail-one-line {
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.detail-main-card,
.detail-side-card {
  padding: 28px;
}

.detail-main-card h2,
.detail-side-card h2 {
  margin: 0 0 14px;
  color: var(--neutral-900);
}

.detail-main-card p {
  margin: 0 0 24px;
  color: var(--neutral-700);
  line-height: 2;
}

.movie-meta-list {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  margin: 0;
}

.movie-meta-list dt {
  color: var(--neutral-500);
}

.movie-meta-list dd {
  margin: 0;
  color: var(--neutral-900);
  font-weight: 700;
}

.movie-meta-list dd span {
  display: inline-block;
  margin: 0 6px 6px 0;
}

.player-main {
  max-width: 1080px;
}

.player-section {
  display: grid;
  gap: 22px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  padding: 14px;
  background: #050816;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 18px;
  background: #000000;
}

.player-note {
  position: absolute;
  right: 28px;
  top: 28px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 12px;
  font-weight: 800;
}

.site-footer {
  margin-top: 80px;
  color: rgba(255, 255, 255, 0.76);
  background: var(--neutral-900);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 42px;
  padding-bottom: 42px;
}

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.footer-links a:hover {
  color: #ffffff;
}

[data-search-list] .is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .header-inner {
    height: 64px;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding: 96px 22px 108px;
  }

  .hero-control {
    top: auto;
    bottom: 26px;
  }

  .hero-prev {
    left: 22px;
  }

  .hero-next {
    right: 22px;
  }

  .hero-dots {
    bottom: 86px;
  }

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .category-pill-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
  }

  .mobile-search input {
    min-width: 0;
    width: 100%;
  }
}
