/* 首页专属 */
.hero {
  padding: 1.5rem 0 2rem;
  animation: fade-up 0.6s ease 0.1s both;
}

.hero h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 28em;
  margin-bottom: 1.5rem;
}

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

.hero-visual {
  margin-top: 2rem;
  height: clamp(180px, 30vw, 240px);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--surface-solid);
  isolation: isolate;
  animation: fade-up 0.7s ease 0.2s both;
}

/* 动态光斑层：多团主题色模糊光球，按主题变量换色 */
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 25% 35%, var(--accent) 0%, transparent 28%),
    radial-gradient(circle at 75% 60%, var(--teal) 0%, transparent 30%),
    radial-gradient(circle at 55% 20%, var(--accent-hover) 0%, transparent 22%),
    radial-gradient(circle at 40% 85%, var(--teal-deep) 0%, transparent 26%);
  filter: blur(40px) saturate(140%);
  opacity: 0.85;
  animation: blob-drift 22s ease-in-out infinite;
  mix-blend-mode: screen;
  z-index: 1;
}

@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25%      { transform: translate(4%, -3%) rotate(90deg) scale(1.05); }
  50%      { transform: translate(-3%, 4%) rotate(180deg) scale(0.97); }
  75%      { transform: translate(-4%, -2%) rotate(270deg) scale(1.03); }
}

/* 主题叠图层：每个主题专属纹理 */
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* 中央文字 */
.hero-visual-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--ink);
  letter-spacing: 0.12em;
  z-index: 3;
  mix-blend-mode: difference;
  animation: text-breathe 4s ease-in-out infinite;
}

@keyframes text-breathe {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}

/* ========== Apple White —— 柔和渐变 + 极淡网格 ========== */
html:not([data-theme]) .hero-visual,
html[data-theme="apple-white"] .hero-visual {
  background: #ffffff;
}
html:not([data-theme]) .hero-visual::before,
html[data-theme="apple-white"] .hero-visual::before {
  opacity: 0.55;
  filter: blur(48px) saturate(130%);
}
html:not([data-theme]) .hero-visual::after,
html[data-theme="apple-white"] .hero-visual::after {
  opacity: 1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 40%, transparent 80%);
}
html:not([data-theme]) .hero-visual-text,
html[data-theme="apple-white"] .hero-visual-text {
  color: #1d1d1f;
  mix-blend-mode: normal;
  text-shadow: 0 1px 30px rgba(255, 255, 255, 0.6);
}

/* ========== Apple Black —— 霓虹光球 + 星点 ========== */
html[data-theme="apple-black"] .hero-visual {
  background: #000;
}
html[data-theme="apple-black"] .hero-visual::before {
  opacity: 0.9;
  filter: blur(32px) saturate(180%);
  animation-duration: 16s;
}
html[data-theme="apple-black"] .hero-visual::after {
  opacity: 1;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.7), transparent 50%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.6), transparent 50%),
    radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(1px 1px at 10% 70%, rgba(255,255,255,0.4), transparent 50%);
  background-size: 120px 120px;
  animation: star-twinkle 6s ease-in-out infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
html[data-theme="apple-black"] .hero-visual-text {
  color: #f5f5f7;
  mix-blend-mode: difference;
  text-shadow: 0 0 24px rgba(41, 151, 255, 0.4);
}

/* ========== Tesla —— 锐利红光横扫 ========== */
html[data-theme="tesla"] .hero-visual {
  background: #f5f5f7;
}
html[data-theme="tesla"] .hero-visual::before {
  opacity: 0.35;
  filter: blur(24px) saturate(110%);
  animation-duration: 8s;
  animation-timing-function: linear;
}
html[data-theme="tesla"] .hero-visual::after {
  opacity: 1;
  background:
    linear-gradient(105deg,
      transparent 0%,
      transparent 40%,
      rgba(227, 25, 55, 0.9) 48%,
      rgba(227, 25, 55, 0.2) 52%,
      transparent 60%,
      transparent 100%);
  background-size: 250% 100%;
  animation: tesla-sweep 4s linear infinite;
  mix-blend-mode: multiply;
}
@keyframes tesla-sweep {
  0%   { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}
html[data-theme="tesla"] .hero-visual-text {
  color: #171a20;
  mix-blend-mode: normal;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
}

/* ========== NVIDIA —— 矩阵绿点阵 + 扫描线 ========== */
html[data-theme="nvidia"] .hero-visual {
  background: #0f0f0f;
}
html[data-theme="nvidia"] .hero-visual::before {
  opacity: 0.7;
  filter: blur(28px) saturate(200%);
  animation-duration: 12s;
}
html[data-theme="nvidia"] .hero-visual::after {
  opacity: 1;
  background-image:
    radial-gradient(circle, rgba(118, 185, 0, 0.55) 1px, transparent 1.5px),
    linear-gradient(180deg, transparent 0%, rgba(118, 185, 0, 0.15) 50%, transparent 100%);
  background-size: 18px 18px, 100% 40px;
  background-position: 0 0, 0 0;
  animation: nvidia-scan 3s linear infinite;
}
@keyframes nvidia-scan {
  0%   { background-position: 0 0, 0 -40px; }
  100% { background-position: 0 0, 0 calc(100% + 40px); }
}
html[data-theme="nvidia"] .hero-visual-text {
  color: #76b900;
  mix-blend-mode: screen;
  text-shadow:
    0 0 12px rgba(118, 185, 0, 0.8),
    0 0 24px rgba(118, 185, 0, 0.4);
  font-weight: 700;
  letter-spacing: 0.18em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.q-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.q-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.q-item {
  border-bottom: 1px solid var(--line);
  animation: fade-up 0.45s ease both;
}

.q-item a {
  display: block;
  padding: 1.15rem 0.15rem;
  color: inherit;
  transition: background 0.15s ease, padding-left 0.2s ease;
}

.q-item a:hover {
  padding-left: 0.5rem;
  background: linear-gradient(90deg, rgba(42, 157, 143, 0.08), transparent);
}

.q-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.q-item a:hover .q-item-title {
  color: var(--teal-deep);
}

.q-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.q-item-meta .replies {
  color: var(--teal);
  font-weight: 600;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-bottom: 1rem;
}

.pager-info {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  min-width: 100px;
  text-align: center;
}

.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 分类筛选 */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.25rem 0 1rem;
}

.cat-filter button,
.cat-filter a.cat-ssr {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.cat-filter button:hover,
.cat-filter a.cat-ssr:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
}

.cat-filter button.active,
.cat-filter a.cat-ssr.active {
  border-color: var(--teal);
  background: rgba(42, 157, 143, 0.12);
  color: var(--teal-deep);
}

.q-item .tax-row {
  margin-bottom: 0.45rem;
}
