/* 知游工具箱 · 首页样式 */

:root {
  --radius: 18px;
  --shadow: 0 12px 32px -16px rgba(37,99,235,.22);
}

body {
  display: flex;
  padding: 40px 16px 48px;
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  margin: auto;
}

/* ===== 头部 ===== */
.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.logo {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(37,99,235,.55);
}
.logo svg { width: 27px; height: 27px; }
.app-head h1 { font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.app-head p { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ===== 区块标题 ===== */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 30px 2px 14px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .5px;
}
.section-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}
.section-count {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* ===== 工具网格 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px 20px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s, border-color .2s;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
  opacity: 0;
  transition: opacity .2s;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-border);
  box-shadow: 0 20px 44px -18px rgba(37,99,235,.34);
}
.tool-card:hover::before { opacity: 1; }
.tool-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.tool-icon {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(37,99,235,.5);
}
.tool-icon svg { width: 26px; height: 26px; }
.tool-tag {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .5px;
}

.tool-name { font-size: 17px; font-weight: 700; margin-top: 16px; }
.tool-desc { font-size: 13px; color: var(--text-2); line-height: 1.75; margin-top: 8px; flex: 1; }

.tool-enter {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  transition: gap .2s;
}
.tool-card:hover .tool-enter { gap: 10px; }
.tool-enter svg { width: 16px; height: 16px; }

/* ===== 占位卡片 ===== */
.tool-card.soon {
  border-style: dashed;
  background: rgba(255,255,255,.55);
  box-shadow: none;
  cursor: default;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 180px;
}
.tool-card.soon:hover { transform: none; border-color: var(--border); }
.tool-card.soon::before { display: none; }
.soon svg { width: 30px; height: 30px; color: var(--text-3); margin-bottom: 12px; }
.soon b { font-size: 14px; font-weight: 600; color: var(--text-2); }
.soon p { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }

/* ===== 底部说明 ===== */
.note {
  margin-top: 28px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.8;
}
.note code {
  font-family: var(--font-mono);
  background: rgba(37,99,235,.08);
  color: var(--blue-deep);
  border-radius: 5px;
  padding: 1px 6px;
}

@media (max-width: 560px) {
  body { padding: 26px 12px 40px; }
  .app-head h1 { font-size: 20px; }
  .logo { width: 46px; height: 46px; border-radius: 13px; }
  .grid { grid-template-columns: 1fr; }
  .section-head { margin-top: 24px; }
}
