body {
  background: #f8f9fa;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
  box-sizing: border-box;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

a {
  color: #885df1;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #885df1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

.forecast-spinner {
  margin: 30px auto;
  width: 50px;
  height: 50px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hide elements initially */
#weather-details {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.weather-app-data.loaded #weather-details {
  opacity: 1;
}

header {
  padding: 0 0 12px 0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid #e5e5ea;
}

.app-header {
  width: 100%;
  margin: 0 0 4px 0;
  padding: 0;
  border-bottom: none;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 4px; 
  width: 100%;
  margin: 0;
  flex-wrap: nowrap; 
}

.header-buttons {
  display: flex;
  gap: 4px;  
  align-items: center;
  margin-left: 2px; 
  flex-shrink: 0;  /* Prevents buttons from shrinking */
}

.search-form {
  flex: 1;
  min-width: 120px;  /* Ensure it doesn't get too small */
}

.icon-button {
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  color: #333;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.icon-button:hover:not(.logout-button) {
  background-color: #e0e0e0;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

#geolocation-button,
#favorite-button,
#theme-toggle {
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
}

.logout-button,
button[title*="Log out" i],
button[title*="Sign out" i] {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #999 !important;
  opacity: 0.7;
}

.logout-button:hover,
button[title*="Log out" i]:hover,
button[title*="Sign out" i]:hover {
  background-color: transparent !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.9;
  color: #666 !important;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.theme-toggle {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.theme-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0);
}

.weather-app {
  background: white;
  max-width: 500px;
  width: 100%;
  margin: 20px auto;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.search-form {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 8px;
  margin: 0;
  align-items: center;
}

.search-form-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  height: 40px;
  box-sizing: border-box;
  background: #f8f9fa;
  color: #333;
  min-width: 0;
  width: 100%;
}

.search-form-input:focus {
  border-color: #885df1;
  box-shadow: 0 0 0 3px rgba(136, 93, 241, 0.2);
}

.search-form-button {
  padding: 0 16px;
  background-color: #f65282;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  height: 40px;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-form-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(136, 93, 241, 0.4);
}

.search-form-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(136, 93, 241, 0.3);
}

/* Favorites */
.favorites-container {
  margin: 10px 0 20px;
  width: 100%;
  overflow: hidden;
  padding-bottom: 4px;
  position: relative;
}

.favorites-list {
  display: flex;
  gap: 8px;
  padding: 4px 0 8px 0;
  min-height: 44px;
  width: 100%;
  overflow-x: auto;
  /* scrollbar-width: none; Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  /* -webkit-overflow-scrolling: touch; */
  box-sizing: border-box;
  padding-right: 1px; /* Prevent margin collapse */
}

/* .favorites-list::-webkit-scrollbar { */
  /* display: none; Chrome, Safari and Opera */
  /* width: 0; Remove scrollbar space */
  /* height: 0; Remove scrollbar space */
  /* background: transparent; Optional: just make scrollbar invisible */
/* } */

.favorite-item {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.favorite-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background: white;
}

.favorite-item .remove-favorite {
  color: #ff6b6b;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.favorite-item .remove-favorite:hover {
  opacity: 1;
}

.favorite-button {
  background: none;
  border: none;
  color: #f65282;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  margin: 0 0 0 4px;
  flex-shrink: 0;
}

.favorite-button:hover {
  background-color: rgba(246, 82, 130, 0.1);
}

.favorite-button svg {
  width: 20px;
  height: 20px;
}

.favorite-button.favorited {
  color: #ff3b30;
}

.favorite-button:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: scale(1.1);
}

/* Geolocation button */
.geolocation-button {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  border-radius: 6px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  flex-grow: 0;
}

.geolocation-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.geolocation-button:active {
  transform: scale(0.98);
}

/* Theme Transition */
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, fill 0.3s ease, stroke 0.3s ease;
}

/* System preference detection */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-color: #6c63ff;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --accent-color: #6c63ff;
    --border-color: #e9ecef;
    --card-bg: rgba(255, 255, 255, 0.8);
    --input-bg: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #6c757d;
    --transition-speed: 0.3s;
  }
  :root:not([data-theme="light"]) body {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: var(--text-primary);
  }
  
  :root:not([data-theme="light"]) .weather-app {
    background: var(--card-bg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  }
  
  :root:not([data-theme="light"]) .search-form-input {
    background: var(--input-bg);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  :root:not([data-theme="light"]) .search-form-input::placeholder {
    color: var(--text-secondary);
  }
  
  :root:not([data-theme="light"]) .search-form-button,
  :root:not([data-theme="light"]) .geolocation-button {
    background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
  }
  
  :root:not([data-theme="light"]) .favorite-item {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
  }
  
  :root:not([data-theme="light"]) .favorite-item:hover {
    background: rgba(255, 255, 255, 0.15);
  }
  
  :root:not([data-theme="light"]) .weather-forecast-day {
    background: rgba(255, 255, 255, 0.05);
  }
  
  :root:not([data-theme="light"]) .weather-forecast-day:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  :root:not([data-theme="light"]) .weather-app-temperature {
    color: var(--text-primary);
  }
  
  :root:not([data-theme="light"]) .unit-toggle:not(.active) {
    color: var(--text-secondary);
  }
  
  :root:not([data-theme="light"]) .unit-separator {
    color: var(--text-secondary);
  }
  
  :root:not([data-theme="light"]) .theme-toggle .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
  }
  
  :root:not([data-theme="light"]) .theme-toggle .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0);
  }
}

main {
  padding: 20px 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.weather-app-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 15px;
  flex-wrap: nowrap;
}

.weather-app-header {
  width: 100%;
  margin: 0;
  padding: 0;
}

.weather-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin: 0;
}

.weather-temp-container {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0 0;
  flex-wrap: wrap;
}

#icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0 8px;
  flex-shrink: 0;
}

#icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.weather-app-temperature-container {
  display: flex;
  align-items: center;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

.weather-app-location {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  max-width: 100%;
  flex: 1;
  min-width: 0;
  position: relative;
  padding-right: 15px;
}

.weather-app-city {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-transform: capitalize;
  white-space: nowrap;
  line-height: 1.2;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-app-temperature {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.weather-app-city-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.weather-app-temperature-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.weather-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px 0 0 0;
  margin: 10px 0 0 0;
  border-top: 1px solid #f0f0f0;
}

.weather-app-details {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 15px 0 0;
  padding: 15px 0 0;
  border-top: 1px solid #eee;
  font-size: 14px;
  color: #666;
}

.weather-app-details-item {
  text-align: center;
  min-width: 80px;
}

.weather-detail {
  background: white;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid #f2f2f7;
  transition: all 0.2s ease;
}

.weather-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: #fff;
}

.weather-detail-icon {
  width: 16px;
  height: 16px;
  color: #8e8e93;
  margin-bottom: 2px;
}

.weather-detail-label {
  font-size: 12px;
  font-weight: 500;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather-detail-value {
  font-size: 20px;
  font-weight: 600;
  color: #1c1c1e;
  margin-top: 2px;
}

.unit-toggle {
  background: none;
  border: none;
  color: #666;
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  transition: all 0.2s ease;
  line-height: 1;
}

.unit-toggle.active {
  color: #333;
  font-weight: 600;
}

.unit-separator {
  color: #ddd;
  user-select: none;
}

.unit-toggle:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.05);
}

.unit-toggle.active {
  color: white;
  background: linear-gradient(135deg, #885df1, #f65282);
  border-color: transparent;
  font-weight: 500;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(136, 93, 241, 0.3);
}

.unit-separator {
  color: #d1d1d6;
  font-weight: 400;
  line-height: 1;
  margin: 0 4px;
  user-select: none;
  font-size: 14px;
}

.favorite-button.favorited {
  color: #ff6b6b;
  fill: #ff6b6b;
  opacity: 1;
}

/* Responsive adjustments */
/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  
  .weather-app {
    padding: 25px 20px;
    border-radius: 18px;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .search-form-button {
    width: 100%;
    padding: 12px;
  }
  
  .weather-app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .weather-app-city {
    font-size: 24px;
  }
  }
  
  .weather-app-temperature {
    font-size: 24px;
  }
  
  .weather-details-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .weather-forecast-day {
    width: 90px;
    padding: 12px 8px;
  }
  
  .weather-forecast-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px;
  }
  
  .weather-app {
    margin: 0;
    padding: 16px;
    border-radius: 16px;
  }
  
  .search-form {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-form-button {
    width: 100%;
  }
  
  .weather-details-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .weather-forecast-day {
    width: 80px;
    padding: 10px 6px;
  
  .weather-forecast-date {
    font-size: 13px;
  }
  
  .weather-forecast-temperature {
    font-size: 13px;
  }
  
  .weather-app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0 15px 0;
  }
  
  .weather-app-location {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 0;
    margin: 0 0 10px 0;
  }
  
  .weather-app-city {
    width: 100%;
    padding: 0;
    margin-bottom: 4px;
    font-size: 22px;
  }
  
  .weather-app-temperature {
    padding: 0;
    margin: 0 0 8px 0;
    display: block;
    font-size: 22px;
  }
  
  .weather-app-temperature-container {
    border-left: none;
    padding: 10px 0 0 0;
    margin: 10px 0 0 0;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    justify-content: flex-start;
  }
  
  .weather-details-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .search-form {
    max-width: 100%;
  }
}

/* Weather Details Grid */
.weather-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  padding: 10px 0;
  margin: 10px 0 0 0;
  width: 100%;
}

.weather-detail {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.weather-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.weather-detail-icon {
  width: 24px;
  height: 24px;
  color: #885df1;
  margin-bottom: 2px;
}

.weather-detail-label {
  font-size: 11px;
  font-weight: 500;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather-detail-value {
  font-size: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #1c1c1e;
  margin-top: 1px;
  line-height: 1.2;
}

/* Weather Forecast */
.weather-app-data {
  margin-bottom: 20px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.weather-forecast {
  width: 100%;
  overflow: visible;
  margin: 20px 0 0 0;
  padding: 0 4px;
  box-sizing: border-box;
}

.weather-forecast-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  overflow: visible;
}

.forecast-day {
  background: white;
  border-radius: 8px;
  padding: 8px 2px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  max-width: 20%;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 1px;
}

.weather-forecast-day {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  border-radius: 16px;
  padding: 16px 12px;
  flex: 0 0 auto;
  width: 100px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.weather-forecast-day:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.weather-forecast-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

.weather-forecast-icon {
  width: 60px;
  height: 60px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.weather-forecast-temperatures {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.weather-forecast-temperature {
  font-size: 14px;
  font-weight: 600;
  color: #885df1;
}

.weather-forecast-temperature:first-child {
  color: #f65282;
}

/* Footer */
footer {
  margin-top: 30px;
  padding: 20px 0 0 0;
  text-align: center;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
}

footer a {
  color: #885df1;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

footer a:hover {
  color: #f65282;
  text-decoration: underline;
}

/* Dark theme adjustments */
/* Dark Theme */
[data-theme="dark"] .weather-app {
  background: rgba(28, 28, 30, 0.9);
  border-color: rgba(60, 60, 67, 0.4);
  color: #f5f5f5;
}

[data-theme="dark"] .search-form {
  background: rgba(44, 44, 46, 0.7);
  border-color: rgba(60, 60, 67, 0.4);
}

[data-theme="dark"] .search-form-input {
  color: #f5f5f5;
  background: transparent;
}

[data-theme="dark"] .search-form-input::placeholder {
  color: #8e8e93;
}

[data-theme="dark"] .search-form-input::placeholder {
  color: #8e8e93;
}

[data-theme="dark"] .weather-app-header,
[data-theme="dark"] .weather-app-details {
  border-color: #2c2c2e;
}

[data-theme="dark"] .weather-app-city,
[data-theme="dark"] .weather-detail-value,
[data-theme="dark"] .weather-forecast-temperature {
  color: #f5f5f5;
}

[data-theme="dark"] .weather-app-temperature {
  color: #d1d1d6;
}

[data-theme="dark"] .unit-toggle {
  border-color: #38383a;
  color: #8e8e93;
}

[data-theme="dark"] .unit-toggle.active {
  background: #0a84ff;
  border-color: #0a84ff;
  color: white;
}

[data-theme="dark"] .unit-separator {
  color: #38383a;
}

[data-theme="dark"] .weather-detail {
  background: rgba(44, 44, 46, 0.7);
  border-color: rgba(60, 60, 67, 0.4);
}

[data-theme="dark"] .weather-forecast-day {
  background: rgba(44, 44, 46, 0.7);
  border-color: rgba(60, 60, 67, 0.4);
}

[data-theme="dark"] .weather-forecast-date {
  color: #aeaeb2;
}

[data-theme="dark"] footer {
  color: #8e8e93;
  border-color: rgba(60, 60, 67, 0.4);
}

[data-theme="dark"] .weather-app-details {
  color: #aeaeb2;
  border-color: rgba(60, 60, 67, 0.4);
}

[data-theme="dark"] .weather-detail-label {
  color: #8e8e93;
}

[data-theme="dark"] .unit-toggle {
  background: rgba(44, 44, 46, 0.7);
  border-color: rgba(60, 60, 67, 0.4);
  color: #aeaeb2;
}

[data-theme="dark"] .weather-detail-label {
  color: #8e8e93;
}

[data-theme="dark"] .weather-detail-icon {
  color: #8e8e93;
}

[data-theme="dark"] .favorite-button {
  color: #8e8e93;
}

[data-theme="dark"] .favorite-button.favorited {
  color: #ff453a;
}

.weather-app-icon {
  width: 88px;
  height: 88px;
}

.weather-app-temperature {
  font-size: 88px;
  line-height: 88px;
  font-weight: bold;
}

.weather-app-units {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 5px;
  font-size: 16px;
  color: #f65282;
  position: relative;
  top: 5px;
}

.unit-toggle {
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.4);
  font-size: 28px;
  cursor: pointer;
  padding: 0 5px;
  transition: all 0.3s ease;
  line-height: 1;
  position: relative;
  outline: none;
}

.unit-toggle.active {
  color: #f65282;
  font-weight: bold;
}

.unit-separator {
  margin: 0 2px;
  color: rgba(0, 0, 0, 0.2);
  font-weight: normal;
}

.unit-toggle:not(.active):hover {
  color: #c4457a;
  transform: scale(1.05);
}

.weather-forecast {
  display: flex;
  justify-content: space-around;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-top: 30px;
}

#wforecast, .wweather-forecast {
  display: flex;
  justify-content: space-between; /* spread evenly */
  gap: 15px; /* space between each day */
  margin-top: 30px;
  flex-wrap: wrap; /* wrap on smaller screens */
}

.weather-forecast-day {
  background: rgb(from 255,255, 255, 0.2);
  backdrop-filter: blur;
  border-radius: 20px 50px 20px 50px;
  padding: 15px 10px;
  flex: 1 1 100px; /* responsive width */
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  /* min-width: 100px; */
}

.weather-forecast-day:hover {
  transform: translateY(-5px);
}

.weather-forecast-date {
  font-size: 16px;
  color: #888;
  margin-bottom: 8px;
  font-weight: 500;
}

.weather-forecast-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px);}
    50% { transform: translateY(-5px);}
}

.weather-forecast-temperatures {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-weight: bold;
  color: #f65282;
}

.weather-forecast-temperature {
  padding: 0 10px;
  font-weight: bold;
}

footer {
  border-top: 1px solid #f9f7fe;
  padding: 30px 0 0 0;
  text-align: center;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
}