/* General page styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 20px;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: auto;
  background: #ffffff;
  padding: 0px 10px 20px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 20px;
  animation: fadeDown 0.8s ease;
  padding-top: 10px;
}

/* Controls */
.controls {
  margin-bottom: 15px;
}

#breed-select,
button {
  padding: 8px 14px;
  font-size: 1rem;
  margin: 0 5px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#breed-select:hover,
button:hover {
  border-color: #333;
  transform: scale(1.05);
}

/* Status message */
.status {
  font-weight: bold;
  color: #666;
  margin: 10px 0;
  animation: fadeDown 0.5s ease;
}

/* Dog gallery grid */
.randomDogImages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

/* Wrapper card with animation */
.randomDogImages div {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 0.6s forwards;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.randomDogImages div:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Dog images */
.randomDogImages img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.randomDogImages img:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* Fullscreen image */
.randomDogImages img.fullwidth {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80%;
  max-width: 800px;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 1000;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

/* Cross button */
.removeDogBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50%;
  display: none;
  transition: all 0.2s ease;
}

.removeDogBtn:hover {
  background: rgba(255, 0, 0, 1);
}

/* Breed label */
.breed-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.9rem;
  padding: 3px 6px;
  border-radius: 6px;
  text-transform: capitalize;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.randomDogImages div:hover .breed-label {
  opacity: 1;
}

/* Favorite button */
.favBtn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff69b4;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.favBtn:hover {
  transform: scale(1.2);
}

/* Animations */
@keyframes fadeUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeDown {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .randomDogImages img {
    height: 140px;
  }
}

@media (max-width: 480px) {
  .randomDogImages img {
    height: 120px;
  }

  h1 {
    font-size: 2rem;
  }

  #breed-select,
  button {
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}
