/* ==========================================================================
   AI工具页面样式
   卡片风格参考悟空AI首页设计语言
   ========================================================================== */

.ai-tools-page {
  --ait-primary: #0044ff;
  --ait-primary-soft: #e9f4ff;
  --ait-ink: #0f2033;
  --ait-muted: #757575;
  --ait-line: #e6ecf6;
  --ait-radius: 1.125rem;
  --ait-shadow: 0 1.125rem 2.875rem rgba(37, 99, 235, 0.12);
  --ait-shadow-sm: 0 0.5rem 1.375rem rgba(15, 32, 51, 0.06);
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ait-ink);
  line-height: 1.6;
  width: min(100vw, 120rem);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -1.5rem;
  background-color: #ffffff;
  overflow-x: hidden;
  padding-bottom: 4rem;
}

/* ── Hero 区域 ── */
.ai-tools-hero {
  padding: 4.5rem 16rem 3rem;
  background:
    radial-gradient(circle at 12% 14%, rgba(125, 211, 252, 0.24), transparent 22rem),
    radial-gradient(circle at 84% 20%, rgba(167, 139, 250, 0.22), transparent 24rem),
    linear-gradient(135deg, #f7fbff 0%, #eef6ff 52%, #f7faff 100%);
  border-bottom: 1px solid #d9e8ff;
  text-align: center;
}

.ai-tools-hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.ai-tools-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #c7d2fe;
  color: #1e40af;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.4rem;
}

.ai-tools-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.ai-tools-hl {
  color: #0576ff;
}

.ai-tools-lead {
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.85;
  margin: 0;
}

/* ── 工具卡片网格 ── */
.ai-tools-grid-section {
  padding: 3rem 16rem 2rem;
}

.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

/* ── 单个工具卡片 ── */
.ai-tool-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e8eef8;
  box-shadow: 0 8px 24px rgba(15, 32, 51, 0.06);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ai-tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.16);
  border-color: #bfdbfe;
}

/* 卡片预览图区域（固定 5:3 比例，参考云端图片 480×288） */
.ai-tool-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 480 / 288;
  overflow: hidden;
  background: #f0f6ff;
}

.ai-tool-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.ai-tool-card:hover .ai-tool-card-cover {
  transform: scale(1.05);
}

/* 卡片内容区 */
.ai-tool-card-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
}

.ai-tool-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 1.2rem;
}

.ai-tool-card-text {
  flex: 1;
  min-width: 0;
}

.ai-tool-card-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.ai-tool-card-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #757575;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-tool-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  transition: background 0.2s ease, color 0.2s ease;
}

.ai-tool-card:hover .ai-tool-card-arrow {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ── 底部提示 ── */
.ai-tools-cta {
  text-align: center;
  padding: 1.5rem 2rem 0;
}

.ai-tools-cta p {
  color: #94a3b8;
  font-size: 0.88rem;
  margin: 0;
}

/* ── 响应式 ── */
@media (max-width: 1400px) {
  .ai-tools-hero {
    padding: 3.5rem 8rem 2.5rem;
  }
  .ai-tools-grid-section {
    padding: 2.5rem 8rem 1.5rem;
  }
}

@media (max-width: 1200px) {
  .ai-tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .ai-tools-hero {
    padding: 3rem 4rem 2.2rem;
  }
  .ai-tools-grid-section {
    padding: 2rem 4rem 1.5rem;
  }
  .ai-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
  }
}

@media (max-width: 768px) {
  .ai-tools-page {
    margin-top: -0.75rem;
  }
  .ai-tools-hero {
    padding: 2.2rem 1.5rem 1.8rem;
  }
  .ai-tools-hero h1 {
    font-size: 1.8rem;
  }
  .ai-tools-lead {
    font-size: 0.92rem;
  }
  .ai-tools-grid-section {
    padding: 1.5rem 1rem 1rem;
  }
  .ai-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .ai-tool-card-body {
    padding: 0.8rem 0.85rem;
    gap: 0.55rem;
  }
  .ai-tool-card-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 1rem;
    border-radius: 10px;
  }
  .ai-tool-card-title {
    font-size: 0.88rem;
  }
  .ai-tool-card-desc {
    font-size: 0.74rem;
  }
  .ai-tool-card-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .ai-tools-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .ai-tool-card {
    flex-direction: row;
    align-items: center;
  }
  .ai-tool-card-media {
    width: 110px;
    min-width: 110px;
    aspect-ratio: auto;
    height: 80px;
  }
  .ai-tool-card-body {
    flex: 1;
  }
}
