:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(148, 163, 184, 0.22);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.14);
  --warning: #f59e0b;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 30px 90px rgba(15, 23, 42, 0.22);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 2%, rgba(37, 99, 235, 0.12), transparent 32rem),
    radial-gradient(circle at 88% 0%, rgba(6, 182, 212, 0.12), transparent 28rem),
    var(--bg);
}

body.is-menu-open {
  overflow: hidden;
}

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;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
}

.brand-text,
.footer-logo span:last-child {
  font-size: 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 20px 18px;
  background: #ffffff;
}

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

.hero {
  width: min(100% - 32px, var(--max));
  margin: 28px auto 0;
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow-xl);
  isolation: isolate;
  background: #0f172a;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 42px;
  align-items: center;
  padding: 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.42)),
    var(--hero-bg) center / cover;
  filter: saturate(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 22%, rgba(37, 99, 235, 0.44), transparent 22rem),
    radial-gradient(circle at 72% 80%, rgba(6, 182, 212, 0.36), transparent 24rem),
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.2));
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.page-hero p,
.section-heading p {
  margin: 0 0 12px;
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 24px 0 0;
  max-width: 680px;
  color: rgba(241, 245, 249, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.32);
}

.button.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 42px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  width: 30px;
  background: #38bdf8;
}

.site-stats {
  width: min(100% - 32px, var(--max));
  margin: -34px auto 0;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.site-stats div,
.filter-panel,
.category-tile,
.movie-card,
.category-overview-card,
.detail-content,
.video-player,
.table-wrap {
  border: 1px solid var(--border);
  background: var(--surface-glass);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.site-stats div {
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px;
  border-radius: var(--radius);
  text-align: center;
}

.site-stats strong {
  font-size: 34px;
  letter-spacing: -0.05em;
  color: var(--primary);
}

.site-stats span {
  color: var(--muted);
  font-weight: 700;
}

.page-section {
  width: min(100% - 32px, var(--max));
  margin: 64px auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.05em;
}

.section-heading a,
.text-link {
  color: var(--primary);
  font-weight: 800;
}

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

.category-tile {
  display: grid;
  gap: 12px;
  min-height: 250px;
  padding: 18px;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  min-height: 88px;
}

.category-cover-stack img,
.category-large-cover img {
  width: 100%;
  height: 100%;
  min-height: 78px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.category-tile strong {
  font-size: 20px;
}

.category-tile span,
.category-meta,
.movie-meta-line,
.filter-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4.15;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.82));
}

.play-chip,
.rank-badge {
  position: absolute;
  color: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.92);
  backdrop-filter: blur(8px);
}

.play-chip {
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
}

.rank-badge {
  top: 12px;
  right: 12px;
  padding: 7px 10px;
  background: rgba(245, 158, 11, 0.95);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.movie-meta-line a {
  color: var(--primary);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.movie-card h3 a:hover {
  color: var(--primary);
}

.movie-card p {
  min-height: 64px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-card.is-compact p {
  min-height: 48px;
}

.tag-row span {
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.2);
  background: rgba(14, 165, 233, 0.08);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
}

.search-box span {
  color: var(--primary);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-selects select {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
}

.filter-summary {
  grid-column: 1 / -1;
}

.plain-page {
  padding-top: 28px;
}

.page-hero {
  width: min(100% - 32px, var(--max));
  margin: 0 auto 36px;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: grid;
  align-content: center;
  padding: 56px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.44), transparent 24rem),
    linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2);
  box-shadow: var(--shadow-xl);
}

.page-hero.small {
  min-height: 260px;
}

.page-hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 18px;
  color: rgba(241, 245, 249, 0.86);
  line-height: 1.75;
}

.category-overview-grid {
  display: grid;
  gap: 18px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-large-cover {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.category-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left;
}

.ranking-table th {
  color: var(--muted);
  background: rgba(241, 245, 249, 0.8);
}

.ranking-table td:first-child {
  color: var(--primary);
  font-weight: 900;
}

.ranking-table a:hover {
  color: var(--primary);
}

.detail-page {
  padding-top: 28px;
}

.detail-hero {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 46px;
  align-items: center;
  padding: 58px;
  border-radius: 34px;
  color: #ffffff;
  box-shadow: var(--shadow-xl);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.54)),
    var(--detail-bg) center / cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.42), transparent 22rem),
    radial-gradient(circle at 82% 82%, rgba(6, 182, 212, 0.28), transparent 26rem);
}

.detail-poster,
.detail-intro {
  position: relative;
  z-index: 1;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(226, 232, 240, 0.78);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #38bdf8;
}

.detail-intro h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-intro p {
  max-width: 820px;
  margin: 22px 0;
  color: rgba(241, 245, 249, 0.86);
  font-size: 18px;
  line-height: 1.78;
}

.detail-score {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.detail-score span {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-score strong {
  color: #38bdf8;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
}

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

.player-play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.36);
}

.player-overlay strong {
  font-size: 26px;
}

.player-overlay em {
  color: rgba(226, 232, 240, 0.82);
  font-style: normal;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  margin: 0;
  color: #bfdbfe;
  font-size: 14px;
}

.detail-content {
  padding: 28px;
  border-radius: var(--radius);
}

.detail-content h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-content h2:first-child {
  margin-top: 0;
}

.detail-content p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

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

.info-list div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.06);
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.search-app-section .movie-grid:empty::before {
  content: "请输入关键词，或选择类型与分类后查看搜索结果。";
  display: block;
  grid-column: 1 / -1;
  padding: 32px;
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed var(--border);
}

.site-footer {
  margin-top: 80px;
  padding: 56px 0 28px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid,
.footer-bottom {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 34px;
}

.footer-logo {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

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

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

@media (max-width: 1080px) {
  .hero-slide,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

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

  .filter-selects {
    justify-content: flex-start;
  }
}

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

  .mobile-menu-button {
    display: inline-block;
  }

  .hero {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-slide,
  .page-hero,
  .detail-hero {
    padding: 32px 24px;
  }

  .hero-controls {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

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

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

  .hero,
  .page-section,
  .page-hero,
  .detail-hero,
  .site-stats,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, var(--max));
  }

  .hero h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 38px;
  }

  .filter-selects select {
    width: 100%;
  }
}
