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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #e8eaf6;
  line-height: 1.6;
}

.weather-app {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.header {
  text-align: center;
  padding: 30px 0;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #74b9ff, #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.subtitle {
  color: #a0a0b0;
  font-size: 1rem;
}

.search-bar {
  display: flex;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 30px;
}

.search-bar input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: #74b9ff;
  background: rgba(255, 255, 255, 0.08);
}

.search-bar button {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #74b9ff, #a29bfe);
  color: #1a1a2e;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(116, 185, 255, 0.3);
}

.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #74b9ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

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

.error {
  text-align: center;
  padding: 20px;
  background: rgba(255, 118, 117, 0.2);
  border: 1px solid rgba(255, 118, 117, 0.4);
  border-radius: 12px;
  margin-bottom: 20px;
  color: #ff6b6b;
}

.hidden {
  display: none !important;
}

.weather-content {
  animation: fadeIn 0.5s ease;
}

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

.current-weather {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  margin-bottom: 25px;
}

.location-info h2 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

#date {
  color: #a0a0b0;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.main-temp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.temp-value {
  font-size: 5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #74b9ff, #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.weather-icon {
  font-size: 5rem;
}

.description {
  font-size: 1.2rem;
  color: #d0d0e0;
  text-transform: capitalize;
  margin-bottom: 15px;
}

.feels-like {
  color: #a0a0b0;
  font-size: 0.95rem;
}

.feels-like span {
  color: #74b9ff;
  font-weight: 600;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.detail-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, background 0.2s;
}

.detail-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
}

.detail-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}

.detail-label {
  display: block;
  color: #a0a0b0;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.detail-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  color: #e8eaf6;
}

.forecast-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 25px;
}

.forecast-section h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.forecast-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px 10px;
  text-align: center;
  transition: background 0.2s;
}

.forecast-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.forecast-day {
  font-size: 0.8rem;
  color: #a0a0b0;
  margin-bottom: 8px;
}

.forecast-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.forecast-temp {
  font-weight: 600;
  font-size: 1.1rem;
}

.forecast-night {
  color: #a0a0b0;
  font-size: 0.9rem;
}

.footer {
  text-align: center;
  padding: 30px 0;
  color: #606070;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .header h1 {
    font-size: 1.8rem;
  }
  
  .temp-value {
    font-size: 3.5rem;
  }
  
  .weather-icon {
    font-size: 3.5rem;
  }
  
  .forecast-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
}