body {
  margin: 0;
  font-family: Arial, Courier, sans-serif;
  background: linear-gradient(to bottom, lightblue, purple);
  display: flex;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.container {
  background-color: blue;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 900px;
  margin: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  color: white;
  margin: 0 0 10px;
}

h2 {
  font-weight: 400;
  color: white;
  margin: 0 0 15px;
}

.input {
  padding: 12px 10px;
  font-size: 18px;
  background-color: aqua;
  border-radius: 5px;
  text-align: center;
  width: 120px;
  border: none;
  outline: none;
}

.errorMessage {
  color: yellow;
  font-weight: 600;
  margin: 10px;
  display: none;
}

.btn {
  text-transform: uppercase;
  width: 250px;
  height: 45px;
  margin: 20px 0;
  font-size: 18px;
  border-radius: 5px;
  background-color: #9e1f9e;
  color: black;
  border: none;
  cursor: pointer;
  transition: background-color 250ms ease-in-out, transform 150ms ease-in-out;
}

.btn:hover {
  background-color: #7a167a;
  transform: scale(1.03);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ✅ Gallery stays available so spinner can show */
.gallery {
  margin-top: 20px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

/* ✅ Pure CSS spinner (no svg needed) */
.spinner {
  width: 50px;
  height: 50px;
  margin: 30px auto;
  border: 6px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  grid-column: 1 / -1; /* center in the grid */
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}