* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, hsl(220, 25%, 12%), hsl(220, 20%, 16%));
  color: hsl(220, 15%, 95%);
  min-height: 100vh;
}

.weather-app {
  display: flex;
  min-height: 100vh;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 24px;
}

.search-container {
  max-width: 500px;
  margin: 0 auto;
  margin-bottom: 24px;
}

.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(220, 10%, 65%);
}

#citySearch {
  width: 100%;
  padding: 12px 12px 12px 40px;
  background: hsl(220, 15%, 22%);
  border: 1px solid hsl(220, 15%, 25%);
  border-radius: 8px;
  color: hsl(220, 15%, 95%);
  font-size: 14px;
}

#citySearch::placeholder {
  color: hsl(220, 10%, 65%);
}

#citySearch:focus {
  outline: none;
  border-color: hsl(200, 100%, 60%);
  box-shadow: 0 0 0 2px hsl(200, 100%, 60%, 0.2);
}

.content-wrapper {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Left Section */
.left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Weather Cards */
.weather-card {
  background: linear-gradient(135deg, hsl(220, 20%, 15%), hsl(220, 18%, 18%));
  border-radius: 16px;
  padding: 32px;
  border: 1px solid hsl(220, 15%, 25%);
}

.main-weather {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weather-info h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.weather-info p {
  color: hsl(220, 10%, 65%);
  margin-bottom: 16px;
}

.temperature {
  font-size: 4rem;
  font-weight: 300;
  line-height: 1;
}

.weather-icon {
  font-size: 7rem;
  line-height: 1;
}

/* Today's Forecast */
.weather-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: hsl(220, 15%, 95%);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.hourly-forecast {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.hourly-item {
  text-align: center;
}

.hourly-time {
  font-size: 0.875rem;
  color: hsl(220, 10%, 65%);
  margin-bottom: 8px;
}

.hourly-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  line-height: 1;
}

.hourly-temp {
  font-size: 1.125rem;
  font-weight: 500;
}

/* Air Conditions */
.air-conditions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.condition-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.condition-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: hsl(220, 10%, 65%);
  font-size: 0.875rem;
}

.condition-label .icon {
  font-size: 1rem;
}

.condition-value {
  font-size: 1.5rem;
  font-weight: 500;
  color: hsl(220, 15%, 95%);
}

/* Right Section - Forecast */
.right-section {
  width: 320px;
}

.forecast-card {
  height: fit-content;
}

.weekly-forecast {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.forecast-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 15px 10px;
}

.forecast-day:not(:last-child) {
  border-bottom: 1px solid hsl(220, 10%, 65%);
}

.forecast-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.forecast-day-name {
  font-size: 0.875rem;
  color: hsl(220, 10%, 65%);
  width: 48px;
}

.forecast-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.forecast-condition {
  font-weight: 500;
  color: hsl(220, 15%, 95%);
}

.forecast-temps {
  font-weight: 500;
  color: hsl(220, 15%, 95%);
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
}

.loading-icon {
    font-size: 4rem;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 1.25rem;
    color: hsl(220, 15%, 95%);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }

  .right-section {
    width: 100%;
  }

  .hourly-forecast {
    grid-template-columns: repeat(3, 1fr);
  }

  .air-conditions {
    grid-template-columns: 1fr;
  }

  .main-weather {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .temperature {
    font-size: 3rem;
  }

  .weather-icon {
    font-size: 4rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 16px;
  }

  .weather-card {
    padding: 24px;
  }

  .hourly-forecast {
    grid-template-columns: repeat(2, 1fr);
  }
}
