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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 100%);
  min-height: 100vh;
  color: #1a2b4c;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #1565c0;
  margin-bottom: 20px;
}

#search-form {
  display: flex;
  gap: 10px;
  justify-content: center;
}

#city-input {
  flex: 1;
  max-width: 360px;
  padding: 12px 16px;
  border: 2px solid #bbdefb;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  color: #1a2b4c;
  outline: none;
  transition: border-color 0.2s;
}

#city-input:focus {
  border-color: #1565c0;
}

#city-input::placeholder {
  color: #90a4ae;
}

button {
  padding: 12px 24px;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #0d47a1;
}

.loading {
  text-align: center;
  color: #1565c0;
  font-size: 16px;
  padding: 24px;
}

.error {
  background: #ffebee;
  color: #c62828;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 15px;
}

.hidden {
  display: none;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(21, 101, 192, 0.1);
}

.card h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1565c0;
  margin-bottom: 20px;
}

.current-main {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.temperature {
  font-size: 56px;
  font-weight: 700;
  color: #0d47a1;
  line-height: 1;
}

.unit {
  font-size: 24px;
  font-weight: 500;
  vertical-align: super;
  color: #1565c0;
}

.condition {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #546e7a;
  text-transform: capitalize;
}

.condition img {
  width: 56px;
  height: 56px;
}

.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #e3f2fd;
}

.detail-item {
  text-align: center;
}

.detail-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #90a4ae;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

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

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

.forecast-day {
  text-align: center;
  padding: 14px 8px;
  background: #f5f9ff;
  border-radius: 10px;
  transition: background 0.2s;
}

.forecast-day:hover {
  background: #e3f2fd;
}

.forecast-day .day-name {
  font-size: 13px;
  font-weight: 600;
  color: #1565c0;
  margin-bottom: 8px;
}

.forecast-day img {
  width: 40px;
  height: 40px;
}

.forecast-day .temps {
  margin-top: 8px;
  font-size: 14px;
}

.forecast-day .high {
  font-weight: 600;
  color: #1a2b4c;
}

.forecast-day .low {
  color: #90a4ae;
  margin-left: 4px;
}

@media (max-width: 500px) {
  .forecast-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .current-main {
    flex-direction: column;
    text-align: center;
  }

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