/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

/* App Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.9;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Search Section */
.search-section {
  width: 100%;
  margin-bottom: 40px;
}

.search-container {
  display: flex;
  background: white;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.search-container:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.search-input {
  flex: 1;
  padding: 20px 25px;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-weight: 400;
  background: transparent;
}

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

.search-button {
  padding: 20px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: scale(1.05);
}

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

/* Weather Result */
.weather-result {
  width: 100%;
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-placeholder {
  text-align: center;
  color: #666;
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.7;
}

.weather-placeholder p {
  font-size: 1.1rem;
  font-weight: 400;
}

/* Weather Card Styles */
.weather-card {
  text-align: center;
  width: 100%;
}

.weather-location {
  margin-bottom: 30px;
}

.weather-location h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.weather-location p {
  color: #666;
  font-size: 1.1rem;
}

.weather-main {
  margin-bottom: 30px;
}

.weather-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.temperature {
  font-size: 3rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

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

.weather-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.weather-detail {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 15px;
  text-align: center;
}

.weather-detail h3 {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.weather-detail p {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

/* Error State */
.error-message {
  text-align: center;
  color: #e74c3c;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Loading State */
.loading {
  text-align: center;
  color: #666;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

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

/* Footer */
.footer {
  text-align: center;
  margin-top: 40px;
  color: white;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-container {
    padding: 15px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .search-input,
  .search-button {
    padding: 15px 20px;
  }

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

  .temperature {
    font-size: 2.5rem;
  }

  .weather-details {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .search-container {
    border-radius: 25px;
  }

  .weather-result {
    border-radius: 15px;
    padding: 25px 15px;
  }
}
