/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #e0f7fa 0%, #bbdefb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: #1565c0;
  margin: 2rem 0;
}

/* Search Form */
.search-form {
  margin-bottom: 2rem;
}

.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1rem;
  padding-right: 3rem;
  border-radius: 0.5rem;
  border: 1px solid #90caf9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.search-button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: #1976d2;
  color: white;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-button:hover {
  background-color: #1565c0;
}

.search-icon {
  color: white;
}

/* Suggestions Dropdown */
#suggestions-container {
  position: absolute;
  top: calc(100% + 0.25rem);
  width: 100%;
  background-color: white;
  border: 1px solid #90caf9;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #e0f0f0;
  transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: #e0f7fa;
}

/* Loading Spinner */
.loading-container {
  text-align: center;
  padding: 2rem 0;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 0.25rem solid rgba(25, 118, 210, 0.3);
  border-top: 0.25rem solid #1976d2;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 1rem;
  color: #1565c0;
}

/* Error Message */
.error-container {
  background-color: #ffebee;
  border-left: 4px solid #f44336;
  color: #d32f2f;
  padding: 1rem;
  border-radius: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.error-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #757575;
}

/* Initial State */
.initial-state {
  text-align: center;
  padding: 3rem 1rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

.cloud-icon {
  color: #90caf9;
  margin-bottom: 1rem;
}

.initial-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #424242;
  margin-bottom: 0.5rem;
}

.initial-text {
  color: #757575;
}

/* Weather Card */
.weather-card {
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.weather-header {
  background-color: #1976d2;
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.location {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.date {
  color: #bbdefb;
}

.weather-body {
  padding: 1.5rem;
}

.temperature-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.temperature {
  font-size: 3rem;
  font-weight: 700;
  color: #212121;
}

.description {
  color: #757575;
  text-transform: capitalize;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .weather-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.weather-item {
  background-color: #f5f5f5;
  padding: 0.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
}

.item-icon {
  margin-right: 0.5rem;
}

.feels-like-icon {
  color: #f44336;
}

.humidity-icon {
  color: #2196f3;
}

.wind-icon {
  color: #757575;
}

.pressure-icon {
  color: #9e9e9e;
}

.item-label {
  font-size: 0.75rem;
  color: #757575;
}

.item-value {
  font-weight: 600;
}

/* Hourly Forecast */
.forecast-section {
  margin-bottom: 2rem;
}

.forecast-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #424242;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.hourly-forecast {
  display: flex;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: #90caf9 #e0e0e0;
}

.hourly-forecast::-webkit-scrollbar {
  height: 6px;
}

.hourly-forecast::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 10px;
}

.hourly-forecast::-webkit-scrollbar-thumb {
  background-color: #90caf9;
  border-radius: 10px;
}

.hourly-item {
  min-width: 80px;
  text-align: center;
  padding: 0.75rem 0.5rem;
  background-color: #f5f5f5;
  border-radius: 0.5rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.hourly-time {
  font-size: 0.875rem;
  color: #616161;
  margin-bottom: 0.5rem;
}

.hourly-icon {
  margin: 0.5rem 0;
}

.hourly-temp {
  font-weight: 600;
  color: #212121;
}

/* Daily Forecast */
.daily-forecast {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.daily-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background-color: #f5f5f5;
  border-radius: 0.5rem;
}

.daily-date {
  width: 100px;
  font-weight: 500;
  color: #424242;
}

.daily-icon {
  margin: 0 1rem;
}

.daily-temp-container {
  margin-left: auto;
  text-align: right;
}

.daily-temp {
  font-weight: 600;
  color: #212121;
  font-size: 1.125rem;
}

.daily-description {
  font-size: 0.75rem;
  color: #757575;
  text-transform: capitalize;
}

.weather-footer {
  background-color: #f5f5f5;
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #757575;
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #1565c0;
}

/* Utility Classes */
.hidden {
  display: none;
}
/* Suggestions Container */
#suggestions-container {
  position: absolute;
  top: calc(100% + 0.25rem);
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

/* Suggestions List */
.suggestions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Suggestion Item */
.suggestion-item {
  padding: 10px;
  cursor: pointer;
  font-size: 16px;
  border-bottom: 1px solid #eee;
}

/* Highlighted Suggestion */
.suggestion-item.highlighted {
  background: #f0f0f0;
}
