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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
  text-align: center;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container h1 {
  color: #667eea;
  margin-bottom: 30px;
  font-size: 2.2em;
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.weather-input {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.weather-input input {
  flex: 1;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  font-size: 16px;
  transition: all 0.3s;
}

.weather-input input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.weather-input button {
  padding: 15px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s;
}

.weather-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.weather-input button:active {
  transform: translateY(0);
}

/* Loading Spinner */
.loading {
  text-align: center;
  padding: 30px;
  animation: fadeIn 0.3s ease-in;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  color: #667eea;
  font-weight: 500;
}

/* Weather Result */
.weather-result {
  padding: 20px;
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  border-radius: 15px;
  min-height: 200px;
  animation: slideUp 0.5s ease-out;
}

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

.weather-icon {
  font-size: 80px;
  margin-bottom: 15px;
  animation: bounce 1s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.weather-result h2 {
  font-size: 2em;
  color: #333;
  margin-bottom: 10px;
}

.weather-desc {
  font-size: 1.3em;
  color: #667eea;
  text-transform: capitalize;
  margin-bottom: 20px;
  font-weight: 500;
}

.temp-display {
  font-size: 4em;
  font-weight: bold;
  color: #667eea;
  margin: 20px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.weather-details {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
  gap: 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex: 1;
  transition: transform 0.3s;
}

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

.detail-item .icon {
  font-size: 2em;
}

.detail-item .label {
  font-size: 0.9em;
  color: #888;
  margin-bottom: 5px;
}

.detail-item .value {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
}

/* Error Message */
.error-message {
  margin-top: 20px;
  padding: 15px;
  background-color: #ffe0e0;
  border-radius: 10px;
  color: #d32f2f;
  font-weight: bold;
  animation: shake 0.5s;
}

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

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 25px;
  }
  
  .container h1 {
    font-size: 1.8em;
  }
  
  .weather-input {
    flex-direction: column;
  }
  
  .temp-display {
    font-size: 3em;
  }
  
  .weather-details {
    flex-direction: column;
  }
}

/* Saved Cities */
.saved-cities {
  margin-bottom: 20px;
}

.saved-cities h3 {
  color: #667eea;
  font-size: 1.2em;
  margin-bottom: 15px;
  text-align: left;
}

.cities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.city-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.city-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.city-tag .remove {
  cursor: pointer;
  font-weight: bold;
  margin-left: 5px;
}

.city-tag .remove:hover {
  color: #ff6b6b;
}

.save-btn {
  margin-top: 20px;
  padding: 12px 30px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s;
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Back Button */
.back-btn {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 25px;
  background: white;
  color: #667eea;
  text-decoration: none;
  border-radius: 10px;
  font-weight: bold;
  border: 2px solid #667eea;
  transition: all 0.3s;
}

.back-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}
