.page-home {
  --home-hero-pad: 20px;
  --home-card-radius: 14px;
  --home-gap: 18px;
  --home-aside-bg: rgba(138, 43, 226, 0.12);
  --home-timeline-gap: 14px;
  --home-grid-min: 150px;
  --home-section-pad: 64px 20px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}
.page-home img {
  max-width: 100%;
  height: auto;
}

/* ===== Hero 首屏框景 ===== */
.page-home .home-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--home-hero-pad);
  isolation: isolate;
}
.page-home .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.page-home .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255, 61, 138, 0.18), transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 240, 255, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(11, 16, 38, 0.72) 0%, rgba(11, 16, 38, 0.88) 100%);
}
.page-home .hero-frame {
  position: absolute;
  top: var(--home-hero-pad);
  right: var(--home-hero-pad);
  bottom: var(--home-hero-pad);
  left: var(--home-hero-pad);
  border: 1px solid var(--color-border);
  pointer-events: none;
  z-index: 2;
}
.page-home .hero-frame-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 0 solid var(--color-accent-gold);
}
.page-home .hero-frame-corner.tl {
  top: -1px;
  left: -1px;
  border-top-width: 3px;
  border-left-width: 3px;
}
.page-home .hero-frame-corner.tr {
  top: -1px;
  right: -1px;
  border-top-width: 3px;
  border-right-width: 3px;
}
.page-home .hero-frame-corner.bl {
  bottom: -1px;
  left: -1px;
  border-bottom-width: 3px;
  border-left-width: 3px;
}
.page-home .hero-frame-corner.br {
  bottom: -1px;
  right: -1px;
  border-bottom-width: 3px;
  border-right-width: 3px;
}
.page-home .hero-frame-scale {
  position: absolute;
  opacity: 0.6;
  background-repeat: repeat;
}
.page-home .hero-frame-scale.top {
  top: 0;
  left: 48px;
  right: 48px;
  height: 10px;
  background-image: repeating-linear-gradient(90deg, rgba(0, 240, 255, 0.7) 0 1px, transparent 1px 6px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}
.page-home .hero-frame-scale.right {
  top: 48px;
  right: 0;
  bottom: 48px;
  width: 10px;
  background-image: repeating-linear-gradient(180deg, rgba(255, 61, 138, 0.7) 0 1px, transparent 1px 6px);
  border-left: 1px solid rgba(255, 61, 138, 0.2);
}
.page-home .hero-frame-scale.bottom {
  bottom: 0;
  left: 48px;
  right: 48px;
  height: 10px;
  background-image: repeating-linear-gradient(90deg, rgba(255, 200, 87, 0.6) 0 1px, transparent 1px 6px);
  border-top: 1px solid rgba(255, 200, 87, 0.2);
}
.page-home .hero-frame-scale.left {
  top: 48px;
  left: 0;
  bottom: 48px;
  width: 10px;
  background-image: repeating-linear-gradient(180deg, rgba(138, 43, 226, 0.7) 0 1px, transparent 1px 6px);
  border-right: 1px solid rgba(138, 43, 226, 0.2);
}
.page-home .hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}
.page-home .hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
}
.page-home .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 200, 87, 0.35);
  padding: 6px 14px;
  background: rgba(11, 16, 38, 0.7);
  border-radius: 999px;
}
.page-home .hero-focus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.page-home .hero-focus-text {
  font-family: var(--font-heading);
  font-size: clamp(64px, 16vw, 176px);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--color-accent-pink) 0%, var(--color-accent-violet) 45%, var(--color-accent-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 61, 138, 0.32));
  white-space: nowrap;
}
.page-home .hero-focus-code {
  font-family: var(--font-emphasis);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  background: rgba(0, 240, 255, 0.08);
  padding: 4px 12px;
  border-left: 2px solid var(--color-accent-blue);
  border-right: 2px solid var(--color-accent-blue);
}
.page-home .hero-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 4.6vw, 42px);
  font-weight: 900;
  font-style: italic;
  line-height: 1.35;
  color: var(--color-text);
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  max-width: 15ch;
}
.page-home .hero-sub {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 48ch;
  letter-spacing: 0.02em;
  margin: 0 auto;
}
.page-home .hero-scroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--color-accent-pink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--color-border-pink);
  border-radius: var(--radius-panel);
  padding: 10px 20px;
  background: rgba(26, 11, 46, 0.72);
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.page-home .hero-scroll-btn:hover,
.page-home .hero-scroll-btn:focus-visible {
  background: rgba(255, 61, 138, 0.14);
  box-shadow: var(--shadow-pink);
  transform: translateY(-2px);
}

/* ===== 分类专区 ===== */
.page-home .home-categories {
  padding: var(--home-section-pad);
  background:
    linear-gradient(180deg, rgba(138, 43, 226, 0.08) 0%, transparent 200px),
    var(--color-bg);
}
.page-home .categories-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: var(--container-max);
  margin: 0 auto 28px;
}
.page-home .section-index {
  font-family: var(--font-emphasis);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-accent-gold);
  display: inline-block;
  margin-bottom: 6px;
}
.page-home .categories-head h2,
.page-home .guide-intro h2,
.page-home .bookmark-head h2,
.page-home .mobile-content h2,
.page-home .updates-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 900;
  font-style: italic;
  line-height: 1.2;
  margin: 0;
  color: var(--color-text);
}
.page-home .categories-head p,
.page-home .updates-head p {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 4px 0 0;
}
.page-home .categories-link,
.page-home .aside-link,
.page-home .btn-link {
  color: var(--color-accent-pink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}
.page-home .categories-link:hover,
.page-home .categories-link:focus-visible,
.page-home .aside-link:hover,
.page-home .aside-link:focus-visible,
.page-home .btn-link:hover,
.page-home .btn-link:focus-visible {
  color: var(--color-accent-pink-light);
  text-shadow: 0 0 16px rgba(255, 61, 138, 0.45);
}
.page-home .categories-body {
  display: grid;
  gap: 32px;
  max-width: var(--container-max);
  margin: 0 auto;
}
.page-home .categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--home-gap);
}
.page-home .cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px;
  background: var(--color-bg-card);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: var(--home-card-radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  overflow: hidden;
}
.page-home .cat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 3px solid var(--color-accent-pink);
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transition: width var(--transition-slow);
}
.page-home .cat-card:hover,
.page-home .cat-card:focus-visible {
  border-color: var(--color-accent-pink);
  background: rgba(255, 61, 138, 0.08);
  box-shadow: var(--shadow-pink);
}
.page-home .cat-card:hover::after,
.page-home .cat-card:focus-visible::after {
  width: 100%;
}
.page-home .cat-num {
  font-family: var(--font-emphasis);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent-gold);
  letter-spacing: 0.1em;
}
.page-home .cat-icon {
  color: var(--color-accent-blue);
  margin: 8px 0 4px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.page-home .cat-card:hover .cat-icon,
.page-home .cat-card:focus-visible .cat-icon {
  color: var(--color-accent-pink);
  transform: scale(1.12);
}
.page-home .cat-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  font-style: italic;
  line-height: 1.3;
}
.page-home .cat-desc {
  font-size: 12px;
  color: var(--color-text-muted);
}
.page-home .categories-aside {
  background: var(--home-aside-bg);
  border: 1px solid rgba(138, 43, 226, 0.25);
  border-radius: var(--radius-panel);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-home .aside-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(138, 43, 226, 0.3);
}
.page-home .aside-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}
.page-home .aside-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.page-home .stat {
  text-align: center;
  background: rgba(11, 16, 38, 0.5);
  padding: 10px 6px;
  border-radius: 8px;
}
.page-home .stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.page-home .stat-num {
  font-family: var(--font-emphasis);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent-gold);
  line-height: 1.2;
}
.page-home .aside-link {
  margin-top: auto;
}

/* ===== 看片指南 ===== */
.page-home .home-guide {
  padding: var(--home-section-pad);
  background:
    linear-gradient(135deg, rgba(15, 45, 46, 0.96) 0%, rgba(11, 16, 38, 0.98) 100%);
}
.page-home .guide-intro {
  max-width: var(--container-max);
  margin: 0 auto 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.page-home .guide-lead {
  font-size: 16px;
  color: var(--color-text);
  max-width: 48ch;
}
.page-home .guide-intro p:not(.guide-lead) {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 52ch;
}
.page-home .btn-link {
  align-self: flex-start;
}
.page-home .guide-timeline {
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
}
.page-home .guide-timeline::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent-pink), var(--color-accent-violet), var(--color-accent-blue));
  opacity: 0.5;
}
.page-home .version-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 24px 44px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
}
.page-home .version-item:last-child {
  border-bottom: 0;
}
.page-home .version-item.current .version-mark {
  background: var(--color-accent-pink);
  color: var(--color-text);
  box-shadow: var(--shadow-pink);
}
.page-home .version-mark {
  position: absolute;
  left: 12px;
  top: 4px;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 2px solid var(--color-accent-blue);
  color: var(--color-accent-blue);
  font-family: var(--font-emphasis);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-home .version-detail h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  font-style: italic;
  margin: 0;
}
.page-home .version-detail p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

/* ===== 收藏夹两步直达 ===== */
.page-home .home-bookmark {
  padding: var(--home-section-pad);
  background:
    radial-gradient(ellipse at 90% 20%, rgba(255, 61, 138, 0.08), transparent 55%),
    var(--color-bg);
}
.page-home .bookmark-head {
  max-width: var(--container-max);
  margin: 0 auto 28px;
}
.page-home .bookmark-lead {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 60ch;
  margin: 8px 0 0;
}
.page-home .bookmark-body {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}
.page-home .bookmark-steps {
  display: grid;
  gap: 16px;
}
.page-home .bookmark-step {
  background: var(--color-bg-card);
  border: 1px solid rgba(255, 61, 138, 0.14);
  border-radius: var(--home-card-radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.page-home .bookmark-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-pink), var(--color-accent-violet));
}
.page-home .bookmark-step:last-child::before {
  background: linear-gradient(90deg, var(--color-accent-violet), var(--color-accent-blue));
}
.page-home .step-num {
  font-family: var(--font-emphasis);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--color-accent-gold);
}
.page-home .bookmark-step h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  font-style: italic;
  margin: 8px 0 6px;
}
.page-home .bookmark-step p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}
.page-home .bookmark-visual {
  background: rgba(15, 45, 46, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: var(--radius-panel);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.page-home .bookmark-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}
.page-home .bookmark-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  text-align: center;
}

/* ===== 移动端优先 ===== */
.page-home .home-mobile {
  padding: var(--home-section-pad);
  background:
    linear-gradient(135deg, rgba(26, 11, 46, 0.96) 0%, rgba(11, 16, 38, 0.98) 100%);
  display: grid;
  gap: 28px;
}
.page-home .mobile-visual {
  position: relative;
  max-width: 300px;
  margin: 0 auto;
}
.page-home .mobile-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-panel);
  border: 1px solid rgba(0, 240, 255, 0.22);
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.page-home .mobile-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-panel);
  background: linear-gradient(135deg, rgba(255, 61, 138, 0.25), rgba(0, 240, 255, 0.18));
  filter: blur(24px);
  transform: scale(0.96);
  z-index: 0;
}
.page-home .mobile-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}
.page-home .mobile-lead {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 56ch;
  margin: 0;
}
.page-home .mobile-features {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.page-home .mobile-features li {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 1.5;
}
.page-home .mobile-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  background:
    linear-gradient(135deg, var(--color-accent-pink), var(--color-accent-violet));
  clip-path: polygon(20% 0, 80% 0, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0 80%, 0 20%);
  opacity: 0.8;
}
.page-home .btn-link {
  align-self: flex-start;
}

/* ===== 今日更新动态 ===== */
.page-home .home-updates {
  padding: var(--home-section-pad);
  background:
    linear-gradient(180deg, rgba(255, 200, 87, 0.06) 0%, transparent 240px),
    var(--color-bg-secondary);
}
.page-home .updates-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: var(--container-max);
  margin: 0 auto 28px;
}
.page-home .updates-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--container-max);
  margin-inline: auto;
  display: grid;
  gap: 12px;
}
.page-home .update-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  background: rgba(11, 16, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.page-home .update-item:hover {
  border-color: rgba(255, 61, 138, 0.3);
  background: rgba(26, 11, 46, 0.7);
}
.page-home .update-time {
  font-family: var(--font-emphasis);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent-gold);
  white-space: nowrap;
}
.page-home .update-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-accent-blue);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.page-home .update-text {
  font-size: 13px;
  margin: 0;
  color: var(--color-text);
  line-height: 1.5;
}
.page-home .updates-footer {
  max-width: var(--container-max);
  margin: 24px auto 0;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}
.page-home .updates-footer a {
  color: var(--color-accent-pink);
  font-weight: 700;
  text-decoration: none;
}
.page-home .updates-footer a:hover {
  color: var(--color-accent-pink-light);
}

/* ===== data-reveal 显现动画 ===== */
.page-home [data-reveal] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease var(--reveal-delay, 0s), transform 0.55s ease var(--reveal-delay, 0s);
}
.page-home [data-reveal].is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 平板 ≥ 640px ===== */
@media (min-width: 640px) {
  .page-home {
    --home-section-pad: 80px 32px;
    --home-grid-min: 170px;
  }
  .page-home .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-home .bookmark-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-home .mobile-visual {
    max-width: 360px;
  }
  .page-home .update-item {
    grid-template-columns: auto auto 1fr;
  }
}

/* ===== 桌面 ≥ 960px ===== */
@media (min-width: 960px) {
  .page-home {
    --home-section-pad: 100px 40px;
  }
  .page-home .categories-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .page-home .categories-body {
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
    align-items: start;
  }
  .page-home .categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-home .categories-aside {
    position: sticky;
    top: calc(var(--header-height) + 24px);
  }
  .page-home .guide-intro {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
  }
  .page-home .guide-intro .btn-link {
    grid-column: 1 / -1;
  }
  .page-home .guide-timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
  }
  .page-home .guide-timeline::before {
    display: none;
  }
  .page-home .version-item {
    padding: 16px;
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: var(--home-card-radius);
    background: rgba(11, 16, 38, 0.5);
  }
  .page-home .version-mark {
    position: static;
    transform: none;
    margin-bottom: 8px;
  }
  .page-home .bookmark-body {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
  .page-home .home-mobile {
    grid-template-columns: 380px 1fr;
    align-items: center;
    gap: 60px;
    max-width: var(--container-max);
    margin: 0 auto;
  }
  .page-home .mobile-visual {
    max-width: 380px;
    margin: 0;
  }
  .page-home .mobile-content {
    margin: 0;
  }
  .page-home .updates-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .page-home .update-item {
    padding: 14px 18px;
  }
}

/* ===== 大屏 ≥ 1200px ===== */
@media (min-width: 1200px) {
  .page-home .categories-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .page-home .hero-title {
    max-width: 18ch;
  }
}

/* ===== reduced-motion 处理 ===== */
@media (prefers-reduced-motion: reduce) {
  .page-home .cat-card,
  .page-home .hero-scroll-btn,
  .page-home [data-reveal] > * {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .page-home .cat-card::after {
    display: none;
  }
}

.page-home {
  --reveal-delay: 0.3s;
}
