/* Favourites — star button */
.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  color: #6b7280;
  transition: all .2s;
  flex-shrink: 0;
  user-select: none;
  vertical-align: middle;
}
.fav-btn .fav-star {
  font-size: 1rem;
  line-height: 1;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.fav-btn:hover {
  border-color: #f59e0b;
  color: #b45309;
  background: #fffbeb;
}
.fav-btn.is-fav {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}
.fav-btn.is-fav .fav-star {
  transform: scale(1.2) rotate(10deg);
}
.fav-btn.pop-anim .fav-star {
  animation: favPop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes favPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5) rotate(15deg); }
  100% { transform: scale(1.2) rotate(10deg); }
}

/* Nav badge */
.nav-fav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .88rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: color .15s;
}
.nav-fav-link:hover { color: #2563eb; text-decoration: none; }
.nav-fav-badge {
  display: none;
  background: #f59e0b;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.nav-fav-badge.has-items { display: inline-block; }

/* Card star (search / related grids) */
.card-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #d1d5db;
  transition: color .15s, transform .2s;
  padding: 2px;
}
.card-fav-btn:hover { color: #f59e0b; transform: scale(1.2); }
.card-fav-btn.is-fav { color: #f59e0b; }
.tool-card, .related-card, .search-result-card { position: relative; }

/* My Tools page */
.my-tools-hero {
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #f59e0b 100%);
  color: #fff;
  padding: 44px 16px 36px;
  text-align: center;
}
.my-tools-hero h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; }
.my-tools-hero p { opacity: .9; font-size: 1rem; }

.my-tools-empty {
  text-align: center;
  padding: 80px 16px;
}
.my-tools-empty .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.my-tools-empty h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.my-tools-empty p { color: #6b7280; margin-bottom: 24px; max-width: 380px; margin-left: auto; margin-right: auto; }

.my-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.my-tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  transition: all .15s;
  display: block;
  text-decoration: none;
}
.my-tool-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  text-decoration: none;
}
.my-tool-card h3 { font-size: .98rem; font-weight: 600; color: #111827; margin: 8px 0 4px; }
.my-tool-card p { font-size: .8rem; color: #6b7280; }
.my-tool-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #d1d5db;
  font-size: 1rem;
  padding: 2px;
  line-height: 1;
  transition: color .15s;
}
.my-tool-remove:hover { color: #ef4444; }
.my-tools-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}
.btn-danger {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.btn-danger:hover { background: #fef2f2; border-color: #ef4444; }

@media (max-width: 500px) {
  .my-tools-grid { grid-template-columns: 1fr 1fr; }
}
