/* ============================================================
   首页样式 —— 深色玻璃科技风（AIwzd 官网）
   区块：Hero 光晕 → 状态条 → 产品矩阵(实时探活) → 工具箱 → AI知识 → 关于
   ============================================================ */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 480px;
  background: radial-gradient(closest-side, rgba(91, 140, 255, 0.22), transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(155, 107, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.hero h1 .grad {
  background: linear-gradient(100deg, #5b8cff, #9b6bff 55%, #4ad3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  position: relative;
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 30em;
}

.hero-cta {
  position: relative;
  margin-top: 2.1rem;
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  display: inline-block;
  padding: 0.75rem 1.7rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.28s, box-shadow 0.28s, filter 0.2s;
}

.btn-hero-pri {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
  color: #fff;
  box-shadow: var(--glow-primary);
}

.btn-hero-ghost {
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-muted);
}

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

.btn-hero-pri:hover {
  filter: brightness(1.1);
}

.btn-hero-ghost:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ---------- 状态条 ---------- */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin: -0.5rem 0 0;
  padding: 0.9rem 1.2rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-faint);
  transition: background 0.3s, box-shadow 0.3s;
}

.status-dot.ok {
  background: #38d27f;
  box-shadow: 0 0 8px rgba(56, 210, 127, 0.8);
}

.status-dot.err {
  background: #565b6b;
}

.status-item[data-state="checking"] .status-dot {
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- 区块通用 ---------- */
.section {
  margin-top: 3.2rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 700;
}

.section-head .sub {
  font-size: 0.875rem;
  color: var(--color-text-faint);
}

/* ---------- 产品矩阵 ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 1rem;
}

.app-card {
  position: relative;
  display: block;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-sizing: border-box;
  transition: transform 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.app-card:hover {
  transform: translateY(-4px);
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.app-card.off {
  opacity: 0.55;
}

.app-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.app-ico {
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border-radius: 0.65rem;
  background: var(--color-primary-light);
  flex-shrink: 0;
}

.app-name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.app-url {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  word-break: break-all;
}

.app-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  background: var(--color-text-faint);
  transition: background 0.3s, box-shadow 0.3s;
}

.app-dot.ok {
  background: #38d27f;
  box-shadow: 0 0 8px rgba(56, 210, 127, 0.8);
}

.app-dot[data-state="checking"] {
  animation: pulse 1.1s ease-in-out infinite;
}

.app-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.app-cat {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.6875rem;
  color: var(--color-text-faint);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
}

.app-card:hover .app-cat {
  display: none;
}

/* ---------- 工具箱 ---------- */
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}

.tool-item:hover {
  transform: translateY(-3px);
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.tool-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
}

.tool-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.tool-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ---------- AI 知识 ---------- */
.knowledge-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.k-card {
  display: block;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}

.k-card:hover {
  transform: translateY(-3px);
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.k-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9688rem;
  font-weight: 600;
}

.k-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---------- 简介 ---------- */
.intro {
  margin-top: 3.2rem;
  padding: 1.8rem 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.intro h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.intro p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero {
    padding: 3.4rem 0 2.8rem;
  }

  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.7rem;
  }

  .app-card {
    padding: 1rem;
  }

  .app-cat {
    display: none;
  }

  .status-bar {
    gap: 0.9rem;
    font-size: 0.8125rem;
  }

  .section-head {
    flex-direction: column;
    gap: 0.15rem;
  }
}
