body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f4f7f9;
  color: #222;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px;
}

.weather-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 600px;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

h1 {
  text-align: center;
  margin: 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 1.8rem;
}

.location-input {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#cityInput {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  min-width: 200px;
}

#cityInput:focus {
  outline: none;
  border-color: #667eea;
}

button {
  padding: 12px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #5a6fd8;
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.current-weather {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

#temperature {
  font-size: 2.5rem;
  margin: 0.5rem 0;
  font-weight: bold;
  color: #667eea;
}

#description {
  font-style: italic;
  color: #666;
  font-size: 1.1rem;
}

.view-options {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.view-btn {
  flex: 1;
  padding: 15px;
  background: transparent;
  color: #666;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.view-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-btn.active {
  background: #667eea;
  color: white;
}

#weatherContent {
  padding: 1.5rem;
  max-height: 500px;
  overflow-y: auto;
}

/* Today's Weather Highlight */
.today-highlight {
  background: #f8f9fc;
  border: 2px solid #667eea;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.today-header {
  font-weight: bold;
  font-size: 1.1rem;
  color: #667eea;
  margin-bottom: 1rem;
  text-align: center;
}

.day-night-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.day-forecast, .night-forecast {
  text-align: center;
  padding: 1rem;
  border-radius: 6px;
}

.day-forecast {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
}

.night-forecast {
  background: #d1ecf1;
  border: 1px solid #b8daff;
}

.period-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.period-temp {
  font-size: 2rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

.day-forecast .period-temp {
  color: #e67e22;
}

.night-forecast .period-temp {
  color: #3498db;
}

.period-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

/* Regular Forecast Items */
.forecast-item {
  display: grid;
  grid-template-columns: 80px 80px 1fr 80px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 15px;
}

.forecast-item:last-child {
  border-bottom: none;
}

.forecast-date {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.forecast-high-low {
  font-weight: bold;
  color: #667eea;
  font-size: 0.95rem;
}

.forecast-desc {
  color: #666;
  font-size: 0.9rem;
}

.forecast-icon {
  font-size: 1.2rem;
  text-align: center;
}

.hourly-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.hourly-time {
  font-weight: 600;
  min-width: 80px;
  font-size: 0.9rem;
}

.hourly-temp {
  font-weight: bold;
  color: #667eea;
  min-width: 60px;
  text-align: right;
}

.loading {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2rem;
}

.error {
  text-align: center;
  color: #dc3545;
  padding: 1rem;
  background: #f8d7da;
  border-radius: 6px;
  margin: 1rem 0;
  border: 1px solid #f5c6cb;
}

.warning {
  text-align: center;
  color: #856404;
  padding: 1rem;
  background: #fff3cd;
  border-radius: 6px;
  margin: 1rem 0;
  border: 1px solid #ffeaa7;
}

footer {
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

.credit {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  margin: 0;
}

@media (max-width: 600px) {
  .location-input {
    flex-direction: column;
  }
  
  #cityInput {
    min-width: auto;
  }
  
  .day-night-container {
    grid-template-columns: 1fr;
  }
  
  .forecast-item {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 5px;
  }
}
  