.tools-section {
  padding: 32px 0 48px;
}

.tools-category {
  margin-bottom: 40px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 6px;
}

.category-icon {
  font-size: 24px;
}

.category-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.category-desc {
  font-size: 14px;
  color: #86909c;
  margin-bottom: 16px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .tools-grid { grid-template-columns: 1fr; }
}

.tool-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 12px;
  padding: 24px 20px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.tool-card:hover {
  border-color: #bedaff;
  background: #f0f5ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(22, 93, 255, 0.1);
}

.tool-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1d2129;
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 13px;
  color: #86909c;
  line-height: 1.5;
  margin-bottom: 10px;
}

.tool-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  background: #f2f3f5;
  color: #86909c;
  font-weight: 500;
}

.tag-hot {
  background: #fff7e8;
  color: #FF7D00;
}

.tag-new {
  background: #e8ffea;
  color: #00B42A;
}

.tag-popular {
  background: #e8f3ff;
  color: #165DFF;
}

.tools-cta {
  padding: 48px 0;
  background: #f7f8fa;
}

.cta-card {
  background: linear-gradient(135deg, #165DFF 0%, #0E42D2 100%);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  color: #fff;
}

.cta-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-card > p {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 16px;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 14px;
  opacity: 0.9;
}

.cta-card .btn {
  background: #fff;
  color: #165DFF;
  font-weight: 600;
}

.cta-card .btn:hover {
  background: #f0f5ff;
}

@media (max-width: 600px) {
  .category-title { font-size: 18px; }
  .cta-card { padding: 32px 20px; }
  .cta-card h2 { font-size: 20px; }
  .cta-features { gap: 10px; font-size: 13px; }
}

/* 收藏功能样式 */
.favorites-section {
  background: linear-gradient(135deg, #fff9e6 0%, #fff5f0 100%);
  border: 1px solid #ffd666;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 40px;
}

.favorites-section .section-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #d48806;
  margin: 0 0 16px 0;
}

.favorites-section .count {
  font-size: 14px;
  font-weight: 400;
  color: #86909c;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.favorite-item {
  position: relative;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.favorite-item:hover {
  border-color: #FFB800;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.15);
  transform: translateY(-2px);
}

.favorite-item .fav-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.favorite-item .fav-icon-large {
  font-size: 32px;
  margin-bottom: 8px;
}

.favorite-item .fav-name {
  font-size: 13px;
  font-weight: 600;
  color: #1d2129;
  margin: 0;
  line-height: 1.4;
}

.btn-remove-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  background: #f2f3f5;
  color: #86909c;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  opacity: 0;
  transition: all 0.2s ease;
}

.favorite-item:hover .btn-remove-fav {
  opacity: 1;
}

.btn-remove-fav:hover {
  background: #f53f3f;
  color: #fff;
}

.favorites-empty {
  text-align: center;
  padding: 32px 20px;
  color: #86909c;
}

.favorites-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.favorites-empty p {
  margin: 4px 0;
  font-size: 14px;
}

.favorites-empty .empty-hint {
  font-size: 12px;
  color: #c9cdd4;
}

/* 工具卡片收藏按钮 */
.tool-card {
  position: relative;
}

.btn-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e6eb;
  border-radius: 12px;
  color: #86909c;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tool-card:hover .btn-favorite {
  opacity: 1;
  transform: scale(1);
}

.btn-favorite .fav-icon {
  font-size: 14px;
  color: #FFB800;
  transition: all 0.3s ease;
}

.btn-favorite .fav-text {
  font-weight: 500;
}

.btn-favorite:hover {
  border-color: #FFB800;
  color: #d48806;
  background: #fffbe6;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.2);
}

.btn-favorite.favorited {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-color: #FFB800;
  color: #fff;
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.35);
}

.btn-favorite.favorited .fav-icon {
  color: #fff;
  animation: starPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-favorite.favorited:hover {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  border-color: #f53f3f;
  box-shadow: 0 4px 12px rgba(245, 63, 63, 0.3);
}

@keyframes starPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4) rotate(-10deg); }
  100% { transform: scale(1) rotate(0); }
}

@media (max-width: 768px) {
  .btn-favorite {
    opacity: 1;
    transform: scale(1);
    top: 6px;
    right: 6px;
    padding: 3px 8px;
    font-size: 10px;
  }

  .btn-favorite .fav-text {
    display: none;
  }

  .favorites-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }

  .favorite-item .fav-icon-large {
    font-size: 28px;
  }

  .favorite-item .fav-name {
    font-size: 12px;
  }
}