/* ===========================================================
   image-main.css — 图片处理工具页（现代深色 SaaS 风格）
   与 index.html hero 风格对齐
   =========================================================== */

/* ===========================================================
   Hero 区域
   =========================================================== */
.img-hero {
  padding-top: 6rem;          /* 为固定 header 留空间（4rem header + 2rem 呼吸） */
  padding-bottom: var(--space-2xl, 64px);
  background: var(--color-bg-primary, #020617);
}

/* --- 面包屑（复用 main.css 样式，覆盖微调） --- */
.img-hero .breadcrumb {
  padding: 0;
  margin-bottom: var(--space-md, 24px);
}

/* --- 标题区 --- */
.img-hero-header {
  text-align: center;
  margin-bottom: var(--space-md, 24px);
}

.img-hero-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.img-hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

/* ===========================================================
   搜索栏
   =========================================================== */
.img-search-bar {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto var(--space-xl, 48px);
  height: 50px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0 18px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.img-search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: var(--accent-shadow);
}

.img-search-icon {
  flex-shrink: 0;
  margin-right: 12px;
}

.img-search-input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
}

.img-search-input::placeholder {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===========================================================
   分类筛选按钮（保留原品牌样式）
   =========================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--space-xl, 48px);
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 20px;
  background: var(--color-bg-secondary, #0f172a);
  border: 1px solid var(--color-border, #334155);
  border-radius: 20px;
  font-size: 14px;
  color: var(--color-text-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  background: var(--color-bg-tertiary, #1e293b);
  border-color: var(--color-accent, #3b82f6);
  color: var(--color-accent, #3b82f6);
}

.filter-tab.active {
  background: var(--color-accent, #3b82f6);
  border-color: var(--color-accent, #3b82f6);
  color: var(--text-on-accent);
}

/* ===========================================================
   工具卡片网格（全新样式）
   =========================================================== */
.card-grid-new {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* --- 工具卡片 --- */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 18px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-card-glow-hover);
}

/* --- 图标容器 --- */
.tool-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: 14px;
  margin-bottom: 16px;
  flex-shrink: 0;
  transition: background 0.25s;
}

.tool-card:hover .tool-card-icon {
  background: var(--accent-bg-hover);
}

/* --- 标题 --- */
.tool-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 8px;
}

/* --- 描述 --- */
.tool-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* --- 新功能标签 --- */
.tool-card .badge-new {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-badge-bg);
  color: var(--color-accent, #3b82f6);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  line-height: 1;
}

/* ===========================================================
   响应式布局
   =========================================================== */

/* 大屏 1200px+ — 5列 */
@media (max-width: 1200px) {
  .card-grid-new {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

/* 平板 1024px — 4列 */
@media (max-width: 1024px) {
  .card-grid-new {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .img-hero-title {
    font-size: 30px;
  }

  .tool-card {
    padding: 24px 14px 20px;
  }

  .tool-card-icon {
    width: 50px;
    height: 50px;
  }

  .tool-card-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* 小平板/大手机 768px — 3列 */
@media (max-width: 768px) {
  .img-hero {
    padding-top: 5rem;
    padding-bottom: var(--space-lg, 32px);
  }

  .img-hero-title {
    font-size: 24px;
  }

  .img-hero-subtitle {
    font-size: 15px;
  }

  .img-search-bar {
    max-width: 100%;
    margin-left: 16px;
    margin-right: 16px;
    margin-bottom: var(--space-md, 24px);
  }

  .filter-tabs {
    gap: 6px;
    margin-bottom: var(--space-md, 24px);
  }

  .filter-tab {
    padding: 6px 14px;
    font-size: 13px;
  }

  .card-grid-new {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tool-card {
    padding: 20px 12px 18px;
  }

  .tool-card-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .tool-card-icon svg {
    width: 22px;
    height: 22px;
  }

  .tool-card-title {
    font-size: 14px;
  }

  .tool-card-desc {
    font-size: 12px;
  }
}

/* 手机 480px — 2列 */
@media (max-width: 480px) {
  .img-hero-title {
    font-size: 20px;
  }

  .img-hero-subtitle {
    font-size: 13px;
    line-height: 1.5;
  }

  .img-search-input {
    font-size: 13px;
  }

  .img-search-input::placeholder {
    font-size: 12px;
  }

  .card-grid-new {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tool-card {
    padding: 16px 10px 14px;
    border-radius: 12px;
  }

  .tool-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 10px;
  }

  .tool-card-icon svg {
    width: 20px;
    height: 20px;
  }

  .tool-card-title {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .tool-card-desc {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }

  .tool-card .badge-new {
    font-size: 10px;
    padding: 3px 7px;
    top: 6px;
    right: 6px;
  }
}
