body {
  background: #eef6ec;
  font-family: "Segoe UI", sans-serif;
}

h1 {
  text-align: center;
  padding: 1rem;
  color: black;
}

header {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: -8px;
  margin-left: 0;
}

header h1 {
  font-size: 1.3rem;
  margin: 0;
}

.favorites-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  padding: 1rem;
}

.favorite-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.favorite-card:hover {
  transform: scale(1.02);
}

.favorite-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.favorite-info {
  padding: 0.8rem 1rem;
}

.favorite-info h3 {
  margin: 0.2rem 0;
  font-size: 1.1rem;
  color: #333;
}

.favorite-info p {
  font-size: 0.9rem;
  color: #666;
  margin: 0.2rem 0;
}

.favorite-info small {
  color: #888;
}

.remove-btn {
  margin-top: 0.6rem;
  padding: 0.4rem 0.8rem;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.remove-btn:hover {
  background-color: #b52b36;
}

.no-favorites {
  text-align: center;
  color: #666;
  padding: 2rem;
  font-size: 1.1rem;
}

.credit-widget {
  position: fixed;
  bottom: 15px;
  right: 15px;
  font-size: 12px;
  color: #fff;
  z-index: 9999;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.3s ease;
}

.credit-toggle {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  padding: 8px 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.credit-content {
  display: none;
  padding: 0 14px 10px 14px;
  animation: fadeIn 0.3s ease;
}

.credit-content a {
  color: #aad4ff;
  text-decoration: none;
}

.credit-content a:hover {
  text-decoration: underline;
}

.credit-widget.open .credit-content {
  display: block;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 20px; 
    margin-left: 10px;
    margin-bottom: -13px;
  }

  header h1 {
    font-size: 1.5rem;
    margin: 0;
  }

  .credit-widget {
    position: fixed;
    bottom: 75px;
    right: 10px;
    z-index: 301;
    font-size: 10px;
  }
}
