/* ===== 首页专属样式 .page-home ===== */
.page-home {
  display: block;
  width: 100%;
  overflow-x: hidden;
  color: var(--color-text);
  font-family: var(--font-body);
  background-color: var(--color-bg);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a0a0a 70%, #110522 100%);
}

.page-home .home-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.page-home .home-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.25;
  mix-blend-mode: luminosity;
}

.page-home .home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(11,26,48,0.85) 0%, rgba(10,10,10,0.7) 50%, rgba(17,5,34,0.6) 100%);
}

.page-home .home-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem 20px;
  padding-top: calc(var(--header-h) + 2rem);
}

.page-home .home-hero-text {
  flex: 1 1 auto;
}

.page-home .home-hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-text-accent) 0%, var(--color-highlight) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 1.2rem 0;
  text-shadow: 0 0 60px rgba(138,43,226,0.15);
}

.page-home .home-hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--color-secondary);
  max-width: 680px;
  margin: 0 0 2rem 0;
  font-weight: 300;
}

.page-home .home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.page-home .pg-btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 20px rgba(138,43,226,0.3);
}

.page-home .pg-btn--primary:hover,
.page-home .pg-btn--primary:focus-visible {
  background: #9b3cf5;
  box-shadow: 0 0 40px rgba(138,43,226,0.5);
  transform: translateY(-2px);
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

.page-home .pg-btn--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: transparent;
  color: var(--color-text-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.page-home .pg-btn--ghost:hover,
.page-home .pg-btn--ghost:focus-visible {
  background: rgba(138,43,226,0.12);
  border-color: var(--color-highlight);
  color: var(--color-highlight);
  box-shadow: 0 0 30px rgba(0,255,255,0.12);
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

/* 右侧悬浮导航 */
.page-home .home-hero-nav {
  flex: 0 0 auto;
  align-self: flex-start;
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(138,43,226,0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  min-width: 140px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.page-home .home-hero-nav-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.page-home .home-hero-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-home .home-hero-nav-list a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition);
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  position: relative;
}

.page-home .home-hero-nav-list a:hover,
.page-home .home-hero-nav-list a:focus-visible {
  color: var(--color-highlight);
  border-left-color: var(--color-highlight);
  padding-left: 1rem;
  outline: none;
}

/* 首屏装饰旋转注释 */
.page-home .home-hero-annotation {
  position: absolute;
  right: 2rem;
  bottom: 3rem;
  z-index: 2;
  font-family: var(--font-title);
  font-size: clamp(0.7rem, 1.2vw, 0.95rem);
  font-weight: 300;
  color: var(--color-text-accent);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.3em;
  opacity: 0.6;
  pointer-events: none;
  padding: 0.5rem 0;
  border-right: 1px solid rgba(138,43,226,0.25);
  padding-right: 0.75rem;
}

/* ---------- 通用节标题 ---------- */
.page-home .home-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1rem;
  margin-bottom: 2rem;
}

.page-home .home-section-header .pg-section-title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--color-text-accent);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-home .home-section-desc {
  flex: 0 0 100%;
  font-size: 1rem;
  color: var(--color-secondary);
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}

.page-home .home-badge-live {
  background: rgba(0,255,255,0.15);
  color: var(--color-highlight);
  border: 1px solid rgba(0,255,255,0.25);
  font-size: 0.75rem;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ---------- 近期更新 ---------- */
.page-home .home-updates {
  padding: 4rem 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.page-home .home-updates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.page-home .home-update-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: rgba(11,26,48,0.45);
  border: 1px solid rgba(138,43,226,0.12);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.page-home .home-update-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-accent), var(--color-highlight));
  opacity: 0;
  transition: var(--transition);
}

.page-home .home-update-card:hover,
.page-home .home-update-card:focus-within {
  border-color: rgba(138,43,226,0.35);
  background: rgba(11,26,48,0.7);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.page-home .home-update-card:hover::before,
.page-home .home-update-card:focus-within::before {
  opacity: 1;
}

.page-home .home-update-card-icon {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(138,43,226,0.08);
  border: 1px solid rgba(138,43,226,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-home .home-update-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .home-update-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.page-home .home-update-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(138,43,226,0.12);
  color: var(--color-text-accent);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.page-home .home-update-card-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

.page-home .home-update-card-summary {
  font-size: 0.9rem;
  color: var(--color-secondary);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition);
}

.page-home .home-update-card[data-hover="expand"]:hover .home-update-card-summary {
  -webkit-line-clamp: 6;
}

.page-home .home-updates-more {
  text-align: center;
}

/* ---------- 历史版本检索 ---------- */
.page-home .home-history {
  padding: 4rem 20px;
  max-width: var(--container-max);
  margin: 0 auto;
  border-top: 1px solid rgba(138,43,226,0.08);
}

.page-home .home-history-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.page-home .home-history-search {
  flex: 1 1 auto;
  width: 100%;
}

.page-home .home-search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.page-home .home-search-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: rgba(11,26,48,0.5);
  border: 1px solid rgba(138,43,226,0.2);
  border-radius: var(--radius);
  transition: var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-sizing: border-box;
}

.page-home .home-search-input::placeholder {
  color: var(--color-secondary);
  opacity: 0.7;
}

.page-home .home-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(138,43,226,0.15), 0 0 20px rgba(138,43,226,0.05);
  background: rgba(11,26,48,0.7);
}

.page-home .home-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--color-accent);
  opacity: 0.7;
  line-height: 1;
  pointer-events: none;
}

.page-home .home-history-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.page-home .home-tag-label {
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: 300;
}

.page-home .home-tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-accent);
  background: rgba(138,43,226,0.08);
  border: 1px solid rgba(138,43,226,0.15);
  border-radius: 20px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.page-home .home-tag:hover,
.page-home .home-tag:focus-visible {
  background: rgba(138,43,226,0.18);
  border-color: var(--color-accent);
  color: var(--color-highlight);
  box-shadow: 0 0 20px rgba(138,43,226,0.08);
  outline: none;
}

.page-home .home-history-hint {
  font-size: 0.9rem;
  color: var(--color-secondary);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
  border-left: 2px solid rgba(138,43,226,0.2);
  padding-left: 1rem;
}

.page-home .home-history-visual {
  flex: 0 0 auto;
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(138,43,226,0.1);
  background: rgba(11,26,48,0.3);
}

.page-home .home-history-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ---------- 常见问题速览 ---------- */
.page-home .home-faq {
  padding: 4rem 20px;
  max-width: var(--container-max);
  margin: 0 auto;
  border-top: 1px solid rgba(138,43,226,0.08);
}

.page-home .home-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-home .home-faq-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(11,26,48,0.35);
  border: 1px solid rgba(138,43,226,0.1);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.page-home .home-faq-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(138,43,226,0.04));
  pointer-events: none;
}

.page-home .home-faq-card:hover,
.page-home .home-faq-card:focus-visible {
  border-color: rgba(138,43,226,0.3);
  background: rgba(11,26,48,0.6);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transform: translateX(4px);
  outline: none;
}

.page-home .home-faq-q {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.page-home .home-faq-arrow {
  font-size: 1.2rem;
  color: var(--color-accent);
  flex: 0 0 auto;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.page-home .home-faq-card:hover .home-faq-arrow,
.page-home .home-faq-card:focus-visible .home-faq-arrow {
  transform: translateX(4px);
  color: var(--color-highlight);
}

.page-home .home-faq-more {
  text-align: center;
}

/* ---------- 分类索引 ---------- */
.page-home .home-categories {
  padding: 4rem 20px;
  max-width: var(--container-max);
  margin: 0 auto;
  border-top: 1px solid rgba(138,43,226,0.08);
}

.page-home .home-categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.page-home .home-category-card {
  padding: 1.5rem;
  background: rgba(11,26,48,0.35);
  border: 1px solid rgba(138,43,226,0.1);
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.page-home .home-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-highlight));
  opacity: 0;
  transition: var(--transition);
}

.page-home .home-category-card:hover,
.page-home .home-category-card:focus-within {
  border-color: rgba(138,43,226,0.3);
  background: rgba(11,26,48,0.6);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.page-home .home-category-card:hover::before,
.page-home .home-category-card:focus-within::before {
  opacity: 1;
}

.page-home .home-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(138,43,226,0.08);
  border: 1px solid rgba(138,43,226,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.page-home .home-category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .home-category-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-accent);
  margin: 0 0 0.6rem 0;
  line-height: 1.3;
}

.page-home .home-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.page-home .home-category-list li a {
  display: inline-block;
  padding: 0.2rem 0;
  font-size: 0.9rem;
  color: var(--color-secondary);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.page-home .home-category-list li a:hover,
.page-home .home-category-list li a:focus-visible {
  color: var(--color-highlight);
  border-bottom-color: rgba(0,255,255,0.2);
  outline: none;
}

/* ---------- 底部提示 ---------- */
.page-home .home-note {
  padding: 2rem 20px 4rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

.page-home .home-note-inner {
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--color-secondary);
  line-height: 1.7;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(138,43,226,0.08);
}

.page-home .home-note-inner a {
  color: var(--color-text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: var(--transition);
}

.page-home .home-note-inner a:hover {
  color: var(--color-highlight);
}

/* ===== 响应式：平板与桌面 ===== */
@media (min-width: 640px) {
  .page-home .home-hero-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
    padding-top: calc(var(--header-h) + 4rem);
  }

  .page-home .home-hero-text {
    flex: 1 1 60%;
  }

  .page-home .home-hero-nav {
    flex: 0 0 180px;
    align-self: flex-start;
    margin-top: 0.5rem;
  }

  .page-home .home-updates-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-home .home-history-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .page-home .home-history-search {
    flex: 1 1 auto;
  }

  .page-home .home-history-visual {
    flex: 0 0 300px;
  }

  .page-home .home-faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-home .home-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .page-home .home-hero {
    min-height: 80vh;
  }

  .page-home .home-hero-title {
    font-size: 5.5rem;
  }

  .page-home .home-hero-desc {
    font-size: 1.25rem;
  }

  .page-home .home-hero-nav {
    flex: 0 0 200px;
  }

  .page-home .home-updates-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .home-history-search {
    flex: 1 1 60%;
  }

  .page-home .home-faq-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .home-categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home .home-hero-annotation {
    right: 3rem;
    bottom: 4rem;
    font-size: 1rem;
  }
}

/* ===== 大屏微调 ===== */
@media (min-width: 1400px) {
  .page-home .home-hero-inner {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ===== 窄屏安全 ===== */
@media (max-width: 400px) {
  .page-home .home-hero-title {
    font-size: 2.2rem;
  }

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

  .page-home .home-hero-actions .pg-btn {
    text-align: center;
  }

  .page-home .home-categories-grid {
    grid-template-columns: 1fr;
  }

  .page-home .home-update-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-home .home-update-card-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .page-home .home-history-tags {
    gap: 0.35rem;
  }

  .page-home .home-history-visual {
    max-width: 100%;
  }
}
