/* === AI Tools page styles === */
/* 品牌色调：薄荷绿 #6ED89A / #22b86f / #11844c */

/* ===== 页面背景 ===== */
.tools-page {
  background:
    radial-gradient(circle at top left, rgba(183, 240, 198, 0.45), transparent 26%),
    radial-gradient(circle at bottom right, rgba(110, 216, 154, 0.14), transparent 20%),
    linear-gradient(180deg, #fbfefd 0%, #f5f7f6 100%);
}

/* ===== Hero 双栏区域 ===== */
.tools-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 0 20px;
}

.tools-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(110, 216, 154, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.tools-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
  align-items: start;
}

/* 左侧主内容 */
.tools-hero__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.tools-hero__main h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  line-height: 1.2;
}

.tools-hero__main .hero__desc {
  font-size: 14px;
  opacity: 0.88;
  margin: 0;
  max-width: none;
}

/* ===== 搜索框（flex 布局，避免按钮被挤下去） ===== */
.tools-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(110, 216, 154, 0.38);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  max-width: 480px;
  width: 100%;
  margin-top: 4px;
}

.tools-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: #1f2937;
  font-size: 14px;
  padding: 4px 0;
}

.tools-search input:focus {
  outline: none;
}

.tools-search input::placeholder {
  color: #9ca3af;
}

.tools-search__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #22b86f 0%, #6ed89a 100%);
  box-shadow: 0 4px 14px rgba(110, 216, 154, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.tools-search__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(110, 216, 154, 0.35);
}

.tools-search__hint {
  margin: 2px 0 0;
  color: rgba(31, 41, 55, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

/* ===== 热门搜索标签 ===== */
.tools-search-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tools-search-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  background: rgba(230, 247, 239, 0.9);
  color: #278654;
  border: 1px solid rgba(110, 216, 154, 0.28);
  transition: all 0.2s ease;
}

.tools-search-tags a:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

/* ===== 右侧热门工具面板 ===== */
.tools-hero__side {
  padding-top: 4px;
}

.tools-hot {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(110, 216, 154, 0.28);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.06);
  backdrop-filter: blur(8px);
}

.tools-hot h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.3px;
}

.tools-hot__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tools-hot__item:hover {
  background: rgba(110, 216, 154, 0.12);
  color: #11844c;
}

.tools-hot__icon {
  font-size: 16px;
  line-height: 1;
}

.tools-hot__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tools-hot__more {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(110, 216, 154, 0.15);
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  color: #11844c;
  transition: color 0.2s ease;
}

.tools-hot__more:hover {
  color: #22b86f;
}

/* ===== 分类区块标题 ===== */
.category-block__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.category-block__title h2 {
  font-size: 20px;
  font-weight: 700;
}

.category-block__title .badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* 分类标题链接样式 - 与 badge 协调 */
.category-block__title a {
  text-decoration: none;
  color: inherit;
}

.category-block__title a h2 {
  color: #1f2937;
  transition: color 0.2s ease;
}

.category-block__title a:hover h2 {
  color: #92400e;
}

.badge-prompts { background: #fef3c7; color: #92400e; }
.badge-tutorials { background: #ede9fe; color: #5b21b6; }
.badge-news { background: #e0f2fe; color: #0c4a6e; }

/* ===== 分类头 ===== */
.category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(110, 216, 154, 0.18);
}

.category-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-head h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(180deg, #22b86f, #6ed89a);
}

/* ===== 更多链接 ===== */
.category-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #11844c;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(230, 247, 239, 0.7);
  border: 1px solid rgba(110, 216, 154, 0.25);
  transition: all 0.25s ease;
}

.category-more span {
  transition: transform 0.25s ease;
}

.category-more:hover {
  background: linear-gradient(135deg, #e9f8f6 0%, #f0fdfa 100%);
  border-color: rgba(110, 216, 154, 0.45);
  transform: translateY(-1px);
}

.category-more:hover span {
  transform: translateX(3px);
}

/* ===== 分类关联资讯滚动条 ===== */
.category-news {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(110, 216, 154, 0.12);
}

/* ===== 工具子分类样式 ===== */
.tool-subcategory {
  margin-bottom: 40px;
}

.tool-subcategory:last-child {
  margin-bottom: 0;
}

.tool-subcategory .category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tool-subcategory .category-head h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

/* ===== 工具卡片在工具页的增强 ===== */
.tools-page .site-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(110, 216, 154, 0.18);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tools-page .site-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 216, 154, 0.45);
  box-shadow: 0 16px 40px rgba(110, 216, 154, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.tools-page .site-card:hover .site-title {
  color: #11844c;
}

/* ===== 分类区块整体 ===== */
.tools-page .category-block {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(110, 216, 154, 0.12);
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.03);
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .tools-hero__inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tools-hero__side {
    display: none;
  }

  .tools-search {
    max-width: none;
  }

  .tools-hero__main h1 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .tools-page .category-block {
    padding: 16px;
    border-radius: 16px;
  }
}
