/* ==================== */
/* ESTILOS GERAIS */
/* ==================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 25px;
}

/* ==================== */
/* BARRA DE PROGRESSO */
/* ==================== */
.progress-container {
  margin: 20px 0;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress {
  height: 100%;
  background: #4CAF50;
  width: 0%;
  transition: width 0.5s ease;
}

/* ==================== */
/* CAMPO DE BUSCA */
/* ==================== */
.search-container {
  display: flex;
  gap: 12px;
  margin: 25px 0;
  justify-content: center;
  align-items: center;
}

#cityInput {
  width: 100%;
  max-width: 400px;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #3498db;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#cityInput:focus {
  border-color: #2980b9;
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.2);
  outline: none;
}

button {
  padding: 12px 24px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

button:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

/* ==================== */
/* RESULTADOS */
/* ==================== */
#result {
  margin: 25px 0;
  padding: 18px;
  border-radius: 6px;
  text-align: center;
  font-size: 17px;
}

.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border-left: 5px solid #4caf50;
}

.warning {
  background-color: #fff8e1;
  color: #f57f17;
  border-left: 5px solid #ffc107;
}

.error {
  background-color: #ffebee;
  color: #c62828;
  border-left: 5px solid #f44336;
}

/* ==================== */
/* GALERIA DE IMAGENS */
/* ==================== */
#imageContainer {
  margin: 30px auto;
  max-width: 600px;
  text-align: center;
  display: none;
  animation: fadeIn 0.5s ease;
}

#currentCityTitle {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.5em;
}

#imageLoader {
  padding: 20px;
  color: #666;
  font-style: italic;
  font-size: 16px;
}

#cityImage {
  max-width: 100%;
  max-height: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

#cityImage:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.thumbnails-header h4 {
  color: #555;
  margin: 25px 0 15px 0;
  font-weight: normal;
  text-align: center;
  font-size: 1.2em;
}

.thumbnails-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.thumbnail-item {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.thumbnail-item:hover {
  transform: translateY(-5px);
}

.thumbnail-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #3498db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.thumbnail-item p {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
}

/* ==================== */
/* MAPA */
/* ==================== */
#map {
  height: 450px;
  margin: 25px 0;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ==================== */
/* ANIMAÇÕES */
/* ==================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== */
/* RESPONSIVIDADE */
/* ==================== */
@media (max-width: 768px) {
  .search-container {
    flex-direction: column;
  }
  
  #cityInput, button {
    width: 100%;
  }

  .thumbnails-container {
    grid-template-columns: repeat(2, 1fr);
  }

  #map {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  .thumbnails-container {
    grid-template-columns: 1fr;
  }

  #cityImage {
    max-height: 300px;
  }
}
