/* PDF 工具主页 —— 卡片网格样式（照搬预览稿 prompt/pdf/pdf_toolbox_preview.html）。
 * 在 layout.css / common.css 之后加载。
 */

/* 页面标题 */
.pt-page-header { margin-bottom: 8px; }
.pt-page-title {
  font-size: 32px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.5px;
}
.pt-page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 8px; }

/* 分组小标题 */
.section-heading {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.5px;
  margin: 28px 4px 14px; text-transform: uppercase;
}
.section-heading::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent);
}

/* 卡片网格 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  padding: 22px 20px 20px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.tool-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  pointer-events: none;
  border-radius: inherit;
}
.tool-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
              0 12px 32px rgba(0, 0, 0, 0.08),
              0 4px 12px rgba(0, 0, 0, 0.04);
}
.tool-card:hover .tool-icon { transform: scale(1.05); }

.tool-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  margin-bottom: 16px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  position: relative; z-index: 1;
}
.tool-name {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 6px; position: relative; z-index: 1;
}
.tool-desc {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  position: relative; z-index: 1;
}
.tool-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: rgba(0, 122, 255, 0.1); color: #007AFF;
  font-weight: 600; letter-spacing: 0.3px;
}
.tool-badge.speed-instant { background: rgba(16, 185, 129, 0.12); color: #047857; }
.tool-badge.speed-quick { background: rgba(0, 122, 255, 0.10); color: #007aff; }
.tool-badge.speed-slow { background: rgba(245, 158, 11, 0.14); color: #b45309; }

/* 12 个图标渐变色 */
.bg-blue    { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.bg-pink    { background: linear-gradient(135deg, #f472b6, #ec4899); }
.bg-purple  { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.bg-green   { background: linear-gradient(135deg, #34d399, #10b981); }
.bg-orange  { background: linear-gradient(135deg, #fb923c, #ea580c); }
.bg-cyan    { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.bg-indigo  { background: linear-gradient(135deg, #818cf8, #6366f1); }
.bg-yellow  { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.bg-red     { background: linear-gradient(135deg, #f87171, #dc2626); }
.bg-violet  { background: linear-gradient(135deg, #c084fc, #9333ea); }
.bg-amber   { background: linear-gradient(135deg, #fbbf24, #d97706); }
.bg-teal    { background: linear-gradient(135deg, #2dd4bf, #0d9488); }

/* 入场动画：卡片逐个淡入 */
.tool-card {
  opacity: 0;
  animation: cardIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tool-grid:first-of-type .tool-card:nth-child(1)  { animation-delay: 0.02s; }
.tool-grid:first-of-type .tool-card:nth-child(2)  { animation-delay: 0.06s; }
.tool-grid:first-of-type .tool-card:nth-child(3)  { animation-delay: 0.10s; }
.tool-grid:first-of-type .tool-card:nth-child(4)  { animation-delay: 0.14s; }
.tool-grid:last-of-type  .tool-card:nth-child(1)  { animation-delay: 0.18s; }
.tool-grid:last-of-type  .tool-card:nth-child(2)  { animation-delay: 0.22s; }
.tool-grid:last-of-type  .tool-card:nth-child(3)  { animation-delay: 0.26s; }
.tool-grid:last-of-type  .tool-card:nth-child(4)  { animation-delay: 0.30s; }
.tool-grid:last-of-type  .tool-card:nth-child(5)  { animation-delay: 0.34s; }
.tool-grid:last-of-type  .tool-card:nth-child(6)  { animation-delay: 0.38s; }
.tool-grid:last-of-type  .tool-card:nth-child(7)  { animation-delay: 0.42s; }
.tool-grid:last-of-type  .tool-card:nth-child(8)  { animation-delay: 0.46s; }
.tool-grid:last-of-type  .tool-card:nth-child(9)  { animation-delay: 0.50s; }
.tool-grid:last-of-type  .tool-card:nth-child(10) { animation-delay: 0.54s; }
.tool-grid:last-of-type  .tool-card:nth-child(11) { animation-delay: 0.58s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 「更多工具」占位卡片 */
.tool-card.coming-soon {
  background: rgba(255, 255, 255, 0.3);
  border: 1px dashed rgba(0, 0, 0, 0.12);
  cursor: default;
}
.tool-card.coming-soon:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.tool-card.coming-soon .tool-icon {
  background: rgba(0, 0, 0, 0.06); color: var(--text-tertiary); box-shadow: none;
}
.tool-card.coming-soon:hover .tool-icon { transform: none; }
.tool-card.coming-soon .tool-name,
.tool-card.coming-soon .tool-desc { color: var(--text-tertiary); }
