:root {
  --color-bg: #f8fafc;
  --color-panel: #ffffff;
  --color-ink: #0f172a;
  --color-muted: #64748b;
  --color-soft: #e2e8f0;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-accent: #f97316;
  --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-ink);
  background: var(--color-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #111827 54%, #1e3a8a 100%);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.26);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: #2563eb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.42);
}

.logo-name {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-subtitle {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #dbeafe;
  font-size: 15px;
  font-weight: 650;
}

.nav-links a {
  padding: 24px 0;
  transition: color .2s ease, transform .2s ease;
}

.nav-links a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .10);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, .10);
  padding: 12px 0 18px;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #dbeafe;
  font-weight: 650;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  color: #fff;
  background: #020617;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(37, 99, 235, .38), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(249, 115, 22, .26), transparent 26%),
    linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, .80));
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 54px 54px;
  z-index: 2;
}

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

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

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .26;
  filter: blur(2px) saturate(1.05);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, .58fr);
  gap: 52px;
  align-items: center;
  min-height: 690px;
  padding: 72px 0;
}

.hero-copy {
  max-width: 760px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .18);
  border: 1px solid rgba(147, 197, 253, .35);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 18px;
  max-width: 820px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .96;
  font-weight: 900;
  letter-spacing: -.05em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(18px, 2.2vw, 24px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
}

.hero-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px;
  font-weight: 700;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 16px 30px rgba(37, 99, 235, .32);
}

.button-primary:hover {
  background: var(--color-primary-dark);
}

.button-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .10);
  backdrop-filter: blur(10px);
}

.button-light {
  color: #0f172a;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.hero-poster-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-poster-card {
  position: relative;
  width: min(100%, 360px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 30px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .38);
  transform: rotate(2deg);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, .82);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px);
}

.hero-poster-caption strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

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

.hero-thumb {
  width: 50px;
  height: 70px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  opacity: .62;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  border-color: #93c5fd;
  transform: translateY(-3px);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section {
  padding: 64px 0;
}

.section-muted {
  background: #f1f5f9;
}

.section-dark {
  color: #e2e8f0;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  color: var(--color-ink);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-dark .section-heading h2,
.section-dark .section-heading p {
  color: #fff;
}

.section-heading p,
.page-title p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

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

.stat-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  color: var(--color-primary);
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
  font-weight: 700;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform .26s ease, filter .26s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.045);
  filter: saturate(1.08);
}

.poster-badge,
.score-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  min-width: 44px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  background: rgba(15, 23, 42, .76);
  backdrop-filter: blur(12px);
}

.poster-badge {
  left: 10px;
}

.score-badge {
  right: 10px;
  background: rgba(249, 115, 22, .92);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 44px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--color-muted);
  font-size: 12px;
}

.card-summary {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fff, #eff6ff);
  box-shadow: var(--shadow-soft);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -56px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .12);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--color-muted);
}

.category-card .category-count {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 22px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: 850;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #f97316);
  font-weight: 950;
}

.rank-item img {
  width: 72px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-main h3 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 900;
}

.rank-main p {
  margin: 0;
  color: var(--color-muted);
}

.rank-score {
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: #f97316;
  font-weight: 900;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 24% 0%, rgba(37, 99, 235, .38), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b 70%, #1d4ed8);
  padding: 58px 0;
}

.page-title h1,
.page-title p {
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 700;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0 16px;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.search-input:focus,
.select-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .18);
}

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

.detail-panel,
.sidebar-panel {
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-panel {
  overflow: hidden;
}

.player-area {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, .22), rgba(2, 6, 23, .72));
  border: 0;
  cursor: pointer;
}

.play-button-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 22px 50px rgba(37, 99, 235, .45);
  transition: transform .2s ease;
}

.play-overlay:hover .play-button-circle {
  transform: scale(1.08);
}

.play-overlay span:last-child {
  display: block;
  margin-top: 16px;
  font-weight: 850;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: #cbd5e1;
  font-size: 13px;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -.04em;
}

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

.info-item {
  padding: 14px;
  border-radius: 16px;
  background: #f1f5f9;
}

.info-item strong {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.info-item span {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-weight: 850;
}

.article-block {
  margin-top: 28px;
}

.article-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.article-block p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.sidebar-panel {
  padding: 20px;
}

.sidebar-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

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

.side-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-card img {
  width: 72px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
}

.side-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 850;
}

.side-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.notice-box {
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  color: #1e3a8a;
  background: #eff6ff;
}

.search-results {
  display: grid;
  gap: 14px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-result-card img {
  width: 94px;
  height: 134px;
  border-radius: 14px;
  object-fit: cover;
}

.search-result-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
}

.search-result-card p {
  margin: 7px 0 0;
  color: #64748b;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
  padding: 46px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  color: #cbd5e1;
  font-size: 14px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  color: #94a3b8;
  font-size: 13px;
}

.back-top {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .10);
  padding: 8px 13px;
  cursor: pointer;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .hero-poster-wrap {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .mobile-menu.is-open {
    display: block;
  }

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

  .hero-thumbs {
    max-width: calc(100% - 36px);
    overflow-x: auto;
    justify-content: flex-start;
  }

  .section {
    padding: 44px 0;
  }

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

  .category-grid,
  .stats-grid,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .toolbar,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .rank-item {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .detail-content {
    padding: 20px;
  }

  .search-result-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .search-result-card img {
    width: 72px;
    height: 104px;
  }
}
