* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background 0.5s ease;
}

.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.app-title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.6s ease;
}

.search-container {
  width: 100%;
  display: flex;
  gap: 12px;
  animation: fadeIn 0.8s ease;
}

.search-input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input::placeholder {
  color: #999;
}

.search-input:focus {
  background: #fff;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.search-btn {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #667eea;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
  background: #fff;
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.search-btn:active {
  transform: scale(0.95);
}

.weather-result {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.5s ease;
  color: #333;
}

.weather-icon-container {
  margin-bottom: 20px;
}

.weather-icon {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.1));
  animation: iconPop 0.6s ease;
}

.temperature {
  font-size: 64px;
  font-weight: 300;
  margin-bottom: 8px;
  color: #667eea;
  letter-spacing: -2px;
}

.city-name {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.weather-description {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
  text-transform: capitalize;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 24px;
  border-top: 2px solid #f0f0f0;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.detail-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.detail-label {
  font-size: 12px;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.error-message {
  background: rgba(255, 255, 255, 0.95);
  padding: 16px 28px;
  border-radius: 50px;
  color: #ff3b3b;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: shake 0.5s ease;
  font-weight: 500;
}

.hidden {
  display: none;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconPop {
  0% {
    transform: scale(0.3) rotate(-45deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

/* Backgrounds dinâmicos baseados no clima */
body.clear {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

body.clouds {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

body.rain,
body.drizzle {
  background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
}

body.snow {
  background: linear-gradient(135deg, #e6dada 0%, #274046 100%);
}

body.mist,
body.fog,
body.haze {
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

body.thunderstorm {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Responsivo */
@media (max-width: 480px) {
  .app-title {
    font-size: 26px;
  }

  .weather-result {
    padding: 30px 20px;
  }

  .temperature {
    font-size: 52px;
  }

  .city-name {
    font-size: 24px;
  }

  .weather-details {
    gap: 16px;
  }

  .detail-value {
    font-size: 16px;
  }
}
