/* ============================================================
   AI工具导航频道 前台样式（b2c.co /home/aitool* 页面）
   主色蓝 #2563eb 对齐站点；浅色主题，独立命名空间避免冲突
   ============================================================ */

.aitool-wrap { padding-bottom: 12px; }

/* ---------- 频道主视觉 ---------- */
.ai-hero {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 30px 32px 22px;
  margin: 18px 0 0;
  background:
    radial-gradient(680px 240px at 88% -40%, rgba(37, 99, 235, .16), transparent 60%),
    radial-gradient(520px 200px at -6% 118%, rgba(124, 58, 237, .10), transparent 55%),
    linear-gradient(180deg, #f4f7ff, #eef2fb);
  border: 1px solid #e3e9f6;
}
.ai-hero-eyebrow {
  font-size: 12px; letter-spacing: 2px; color: #2563eb; font-weight: 700;
  text-transform: uppercase;
}
.ai-hero-title {
  margin: 8px 0 6px; font-size: 30px; line-height: 1.3; color: #111827; font-weight: 800;
}
.ai-hero-title em { font-style: normal; color: #2563eb; }
.ai-hero-sub {
  margin: 0 0 16px; max-width: 720px; color: #4b5563; font-size: 14px; line-height: 1.8;
}
.ai-search { display: flex; max-width: 560px; }
.ai-search input {
  flex: 1; height: 42px; padding: 0 14px; border: 1px solid #c7d2fe; border-right: 0;
  border-radius: 8px 0 0 8px; font-size: 14px; outline: none; background: #fff;
}
.ai-search input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.ai-search button {
  width: 88px; border: 0; border-radius: 0 8px 8px 0; background: #2563eb; color: #fff;
  font-size: 15px; cursor: pointer;
}
.ai-search button:hover { background: #1d4ed8; }
.ai-hero-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.ai-hero-actions .btn { border-radius: 8px; }

.ai-stats { display: flex; gap: 34px; margin-top: 20px; flex-wrap: wrap; }
.ai-stat { display: flex; align-items: baseline; gap: 6px; }
.ai-stat b { font-size: 26px; color: #111827; font-weight: 800; line-height: 1; }
.ai-stat b i { font-style: normal; font-size: 16px; color: #2563eb; }
.ai-stat span { font-size: 13px; color: #6b7280; }

/* ---------- 分类胶囊 ---------- */
.ai-pills {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 4px; align-items: center;
}
.ai-pill {
  padding: 6px 16px; border-radius: 999px; font-size: 13px; color: #374151;
  background: #f3f4f6; border: 1px solid transparent; transition: all .18s;
}
.ai-pill:hover { color: #2563eb; background: #eef2ff; }
.ai-pill.active {
  color: #fff; background: #2563eb; font-weight: 600; box-shadow: 0 2px 8px rgba(37, 99, 235, .28);
}

/* ---------- 排序栏 ---------- */
.ai-sortbar {
  display: flex; justify-content: space-between; align-items: center;
  margin: 18px 0 12px; padding: 10px 4px; border-bottom: 1px solid #eef0f4;
}
.ai-count { color: #6b7280; font-size: 13px; }
.ai-count b { color: #e60012; font-size: 16px; }
.ai-sorts { display: flex; gap: 4px; }
.ai-sorts a {
  padding: 5px 14px; border-radius: 6px; font-size: 13px; color: #4b5563;
}
.ai-sorts a:hover { color: #2563eb; background: #eef2ff; }
.ai-sorts a.active { color: #2563eb; background: #eef2ff; font-weight: 700; }

/* ---------- 工具卡片网格 ---------- */
.ai-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ai-grid { grid-template-columns: 1fr; }
}
.ai-card {
  background: #fff; border: 1px solid #e8ebf1; border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.ai-card:hover { box-shadow: 0 10px 26px rgba(17, 24, 39, .08); transform: translateY(-2px); }
.ai-card-top { display: flex; gap: 12px; align-items: center; }
.ai-logo {
  flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden;
  background: #fff; border: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: center;
}
.ai-logo img { width: 100%; height: 100%; object-fit: contain; }
.ai-logo-letter {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 800;
}
.ai-card:nth-child(6n+1) .ai-logo-letter { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.ai-card:nth-child(6n+2) .ai-logo-letter { background: linear-gradient(135deg, #7c3aed, #6366f1); }
.ai-card:nth-child(6n+3) .ai-logo-letter { background: linear-gradient(135deg, #e60012, #f97316); }
.ai-card:nth-child(6n+4) .ai-logo-letter { background: linear-gradient(135deg, #059669, #10b981); }
.ai-card:nth-child(6n+5) .ai-logo-letter { background: linear-gradient(135deg, #d97706, #f59e0b); }
.ai-card:nth-child(6n+6) .ai-logo-letter { background: linear-gradient(135deg, #0e7490, #0891b2); }

.ai-card-name {
  display: block; font-size: 16px; font-weight: 700; color: #111827; line-height: 1.4;
}
.ai-card-name:hover { color: #2563eb; }
.ai-card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.ai-tag {
  font-size: 11px; padding: 1px 8px; border-radius: 4px; background: #f3f4f6; color: #6b7280;
}
.ai-tag-hot { background: #fff1f0; color: #e60012; }
.ai-tag-rec { background: #fff7e6; color: #d97706; }
.ai-tag-top { background: #eef2ff; color: #2563eb; }
.ai-mode-free { background: #ecfdf5; color: #059669; }
.ai-mode-freemium { background: #eef2ff; color: #2563eb; }
.ai-mode-paid { background: #fff1f0; color: #e60012; }
.ai-mode-trial { background: #f0f9ff; color: #0284c7; }

.ai-card-slogan {
  flex: 1; margin: 12px 0; font-size: 13px; color: #4b5563; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ai-card-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px dashed #edf0f5; margin-top: 2px;
}
.ai-rate-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fffbeb; border: 1px solid #fde68a; color: #b45309;
  border-radius: 6px; padding: 2px 9px; font-size: 12px;
}
.ai-rate-pill b { font-size: 15px; }
.ai-rate-none { font-size: 12px; color: #9ca3af; }
.ai-hits { font-size: 12px; color: #9ca3af; }
.ai-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.ai-btn-detail, .ai-btn-go {
  flex: 1; text-align: center; font-size: 13px; padding: 7px 0; border-radius: 7px;
  transition: all .18s;
}
.ai-btn-detail {
  border: 1px solid #d8dee9; color: #374151; background: #fff;
}
.ai-btn-detail:hover { border-color: #2563eb; color: #2563eb; }
.ai-btn-go { background: #2563eb; color: #fff; }
.ai-btn-go:hover { background: #1d4ed8; }

.ai-empty {
  text-align: center; color: #6b7280; padding: 60px 0; background: #fff;
  border: 1px dashed #d8dee9; border-radius: 12px; font-size: 14px;
}
.ai-empty a { color: #2563eb; }

/* ---------- 详情页 ---------- */
.ai-crumb {
  font-size: 13px; color: #6b7280; margin: 16px 0 0;
}
.ai-crumb a { color: #2563eb; }
.ai-detail-head {
  display: flex; gap: 18px; margin: 14px 0; padding: 22px;
  background: #fff; border: 1px solid #e8ebf1; border-radius: 14px; align-items: center;
  flex-wrap: wrap;
}
.ai-detail-logo { width: 84px; height: 84px; border-radius: 18px; overflow: hidden; flex: none;
  border: 1px solid #e5e7eb; background: #fff; display: flex; align-items: center; justify-content: center;}
.ai-detail-logo img { width: 100%; height: 100%; object-fit: contain; }
.ai-detail-logo .ai-logo-letter { font-size: 34px; border-radius: 18px; }
.ai-detail-main { flex: 1; min-width: 240px; }
.ai-detail-name { font-size: 24px; font-weight: 800; color: #111827; line-height: 1.3; }
.ai-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.ai-detail-sub { color: #6b7280; font-size: 14px; margin-top: 10px; line-height: 1.7; }
.ai-detail-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 200px; }
.ai-detail-actions .ai-btn-go { padding: 11px 0; font-size: 15px; border-radius: 8px; }
.ai-detail-host {
  font-size: 12px; color: #9ca3af; text-align: center;
}

.ai-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 960px) {
  .ai-detail-grid { grid-template-columns: 1fr; }
}
.ai-panel {
  background: #fff; border: 1px solid #e8ebf1; border-radius: 12px;
  padding: 20px; margin-bottom: 16px;
}
.ai-panel-title {
  font-size: 16px; font-weight: 700; color: #111827; margin: 0 0 14px;
  padding-left: 10px; border-left: 4px solid #2563eb; line-height: 1.2;
}
.ai-desc { font-size: 14px; line-height: 2; color: #374151; word-break: break-word; }
.ai-desc img { max-width: 100%; }
.ai-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-tag-link {
  font-size: 12px; color: #2563eb; background: #eef2ff; border-radius: 6px; padding: 3px 10px;
}
.ai-tag-link:hover { background: #dbe4ff; }
.ai-tag-link::before { content: '#'; opacity: .6; }

.ai-faq-item { border: 1px solid #e8ebf1; border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.ai-faq-q {
  padding: 11px 14px; font-size: 14px; font-weight: 600; color: #111827; cursor: pointer;
  background: #f8fafc; display: flex; justify-content: space-between; align-items: center;
}
.ai-faq-q::after { content: '+'; color: #2563eb; font-weight: 700; font-size: 16px; }
.ai-faq-item.open .ai-faq-q::after { content: '−'; }
.ai-faq-a { padding: 2px 14px 12px; font-size: 13px; line-height: 1.9; color: #4b5563; display: none; white-space: pre-line; }
.ai-faq-item.open .ai-faq-a { display: block; }

/* 相关工具侧栏 */
.ai-related-card {
  display: flex; gap: 10px; align-items: center; padding: 10px 0;
  border-bottom: 1px dashed #edf0f5;
}
.ai-related-card:last-child { border-bottom: 0; }
.ai-related-card .ai-logo { width: 40px; height: 40px; border-radius: 9px; }
.ai-related-card .ai-logo-letter { font-size: 17px; }
.ai-related-main { flex: 1; min-width: 0; }
.ai-related-name {
  font-size: 14px; font-weight: 600; color: #111827; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-related-name:hover { color: #2563eb; }
.ai-related-meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* ---------- 评测 ---------- */
.ai-summary {
  display: flex; gap: 26px; align-items: center; padding: 4px 2px 0; flex-wrap: wrap;
}
.ai-summary-score { text-align: center; }
.ai-summary-score b { font-size: 46px; color: #e60012; line-height: 1; font-weight: 800; }
.ai-summary-score b small { font-size: 18px; }
.ai-summary-score span { display: block; font-size: 12px; color: #9ca3af; margin-top: 6px; }
.ai-summary-bars { flex: 1; min-width: 220px; }
.ai-bar-row { display: flex; align-items: center; gap: 10px; margin: 5px 0; font-size: 12px; }
.ai-bar-row .ai-bar-label { width: 36px; color: #6b7280; text-align: right; white-space: nowrap; flex-shrink: 0; }
.ai-bar-track { flex: 1; height: 10px; background: #f1f3f7; border-radius: 5px; overflow: hidden; }
.ai-bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #10b981, #34d399); }
.ai-summary-bars .ai-bar-row:nth-child(1) .ai-bar-fill { background: linear-gradient(90deg, #10b981, #34d399); } /* 5星 深绿好评 */
.ai-summary-bars .ai-bar-row:nth-child(2) .ai-bar-fill { background: linear-gradient(90deg, #22c55e, #4ade80); } /* 4星 浅绿 */
.ai-summary-bars .ai-bar-row:nth-child(3) .ai-bar-fill { background: linear-gradient(90deg, #eab308, #facc15); } /* 3星 黄 */
.ai-summary-bars .ai-bar-row:nth-child(4) .ai-bar-fill { background: linear-gradient(90deg, #f97316, #fb923c); } /* 2星 橙 */
.ai-summary-bars .ai-bar-row:nth-child(5) .ai-bar-fill { background: linear-gradient(90deg, #ef4444, #f87171); } /* 1星 红差评 */
.ai-bar-row .ai-bar-cnt { width: 46px; color: #9ca3af; }

.ai-rev { padding: 16px 0; border-bottom: 1px dashed #edf0f5; }
.ai-rev:first-child { padding-top: 2px; }
.ai-rev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ai-rev-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex: none;
}
img.ai-rev-avatar { object-fit: cover; background: #f1f3f7; }
.ai-rev-name { font-size: 13px; font-weight: 600; color: #111827; }
.ai-rev-stars { color: #f59e0b; letter-spacing: 1px; font-size: 14px; }
.ai-rev-stars .ai-stars-empty { color: #d1d5db; }
.ai-rev-date { margin-left: auto; font-size: 12px; color: #9ca3af; }
.ai-rev-text { font-size: 14px; color: #374151; line-height: 1.9; word-break: break-word; }
.ai-rev-dims { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ai-dim {
  font-size: 12px; border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 10px; color: #4b5563;
  background: #fafbfc;
}
.ai-dim b { color: #b45309; }
.ai-dim .ai-dim-stars { color: #f59e0b; margin-left: 4px; }

/* 评测提交表单 */
.ai-rev-form { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.ai-rev-form-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 12px; }
.ai-rate-select { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.ai-rate-btn {
  padding: 4px 6px; background: transparent; border: 0;
  color: #d1d5db; font-size: 22px; cursor: pointer; line-height: 1;
  transition: color .15s, transform .12s;
}
.ai-rate-btn:hover { color: #fbbf24; }
.ai-rate-btn.on, .ai-rate-btn.on:hover { color: #f59e0b; }

/* 评测表单紧凑布局：总分 / (功能+易用性) / (性价比+稳定性) / (效果质量) */
.ai-rev-form .ai-rate-select { gap: 2px; margin: 0 8px 0 0; }
.ai-rate-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.ai-rate-line.ai-rate-dims { display: block; }
.ai-rate-line.ai-rate-dims .ai-rate-line-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.ai-rate-label { font-size: 13px; color: #4b5563; font-weight: 600; }
.ai-rate-desc { font-size: 12px; color: #9ca3af; margin-left: 2px; }
.ai-form-label { font-size: 13px; color: #4b5563; margin: 10px 0 6px; font-weight: 600; }
.ai-dim-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.ai-dim-row .ai-dim-name { width: 58px; font-size: 13px; color: #4b5563; }
.ai-dim-row .ai-rate-select { margin: 0; }
.ai-rev-form textarea {
  width: 100%; box-sizing: border-box; min-height: 96px; border: 1px solid #d8dee9; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; resize: vertical; font-family: inherit; line-height: 1.7;
}
.ai-rev-form textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.ai-rev-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 10px; flex-wrap: wrap; }
.ai-rev-hint { font-size: 12px; color: #9ca3af; }
.ai-login-tip {
  background: #eef2ff; border: 1px dashed #a5b4fc; color: #3730a3; border-radius: 8px;
  padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
}
.ai-login-tip a { color: #2563eb; font-weight: 700; }

/* ---------- 提交收录表单 ---------- */
.ai-form-page { max-width: 760px; margin: 18px auto 0; }
.ai-form-page .ai-form-title { font-size: 22px; font-weight: 800; color: #111827; text-align: center; }
.ai-form-page .ai-form-sub { text-align: center; color: #6b7280; font-size: 13px; margin: 6px 0 18px; }
.ai-form-panel { background: #fff; border: 1px solid #e8ebf1; border-radius: 14px; padding: 26px; }
.ai-form-item { margin-bottom: 16px; }
.ai-form-item label { display: block; font-size: 13px; color: #374151; margin-bottom: 6px; font-weight: 600; }
.ai-form-item label i { font-style: normal; color: #e60012; margin-right: 2px; }
.ai-form-item input[type="text"],
.ai-form-item input[type="url"],
.ai-form-item select,
.ai-form-item textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #d8dee9; border-radius: 8px;
  padding: 9px 12px; font-size: 14px; background: #fff; font-family: inherit; line-height: 1.7;
}
.ai-form-item input:focus, .ai-form-item select:focus, .ai-form-item textarea:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
.ai-form-item textarea { min-height: 110px; resize: vertical; }
.ai-form-tip { font-size: 12px; color: #9ca3af; margin-top: 4px; line-height: 1.7; }
.ai-submit-bar { text-align: center; margin-top: 8px; }
.ai-submit-bar .btn { padding: 10px 40px; font-size: 15px; border-radius: 8px; }

.ai-notice {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; margin-bottom: 16px; line-height: 1.8;
}

/* 收藏按钮（工具详情 actions 列内，与 ai-btn-detail 同尺寸） */
.ai-detail-actions .ai-fav-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex: 1; width: 100%; box-sizing: border-box;
  font-size: 13px; padding: 7px 0; border-radius: 7px;
}

/* ---------- 相关评测文章（后台「相关AI工具」关联的资讯，反向展示） ---------- */
.ai-rel-arts { display: flex; flex-direction: column; gap: 10px; }
.ai-rel-art {
  display: flex; gap: 12px; padding: 10px; text-decoration: none;
  border: 1px solid #eef2f7; border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.ai-rel-art:hover { border-color: #bfdbfe; box-shadow: 0 4px 14px rgba(37, 99, 235, .08); }
.ai-rel-art-thumb { flex: none; width: 96px; height: 64px; border-radius: 8px; overflow: hidden; background: #f1f5f9; }
.ai-rel-art-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-rel-art-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ai-rel-art-title {
  font-size: 14px; font-weight: 600; color: #1f2937; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ai-rel-art:hover .ai-rel-art-title { color: #2563eb; }
.ai-rel-art-desc {
  font-size: 12px; color: #6b7280; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.ai-rel-art-meta { font-size: 12px; color: #9ca3af; }
@media (max-width: 600px) {
  .ai-rel-art-thumb { width: 78px; height: 56px; }
  .ai-rel-art { padding: 8px; gap: 10px; }
}
