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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #ffd54f 0%, #ffe082 100%);
  min-height: 100vh;
  transition: all 0.6s ease;
  color: #212121;
}

.container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 100px);
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.location-info {
  flex: 1;
}

.location-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.date-time {
  font-size: 14px;
  opacity: 0.8;
  font-weight: 500;
}

.settings-icon {
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.settings-icon:hover {
  transform: rotate(45deg);
}

/* Search */
.search-container {
  position: relative;
  margin-bottom: 30px;
}

.search-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
  border: none;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  outline: none;
  transition: all 0.3s ease;
  color: #212121;
}

.search-input:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.search-input::placeholder {
  color: #666;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 5px;
  display: none;
}

.dropdown.show {
  display: block;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #212121;
}

.dropdown-item:hover {
  background: rgba(255, 183, 0, 0.1);
  transform: translateX(5px);
}

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

.city-name {
  font-weight: 600;
  font-size: 14px;
}

.country-info {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* Main Weather Display */
.main-weather {
  text-align: center;
  margin-bottom: 40px;
}

.weather-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  animation: float 3s ease-in-out infinite;
}

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

.temperature-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.temperature {
  font-size: 72px;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Vertical Thermometer */
.main-thermometer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thermometer-tube {
  width: 12px;
  height: 80px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.thermometer-mercury {
  position: absolute;
  bottom: 0;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(
    to top,
    #1e88e5 0%,
    #42a5f5 15%,
    #66bb6a 30%,
    #9ccc65 45%,
    #ffee58 60%,
    #ffb74d 75%,
    #ff8a65 85%,
    #ef5350 100%
  );
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.thermometer-bulb {
  width: 16px;
  height: 16px;
  background: #ef5350;
  border-radius: 50%;
  position: absolute;
  bottom: -2px;
  left: -2px;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.temp-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 80px;
  font-size: 10px;
  opacity: 0.7;
  font-weight: 600;
}

.weather-description {
  font-size: 24px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 10px;
}

/* Details */
.details-row {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 30px;
}

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

.detail-label {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 5px;
}

.detail-value {
  font-size: 16px;
  font-weight: 600;
}

/* Forecast */
.forecast-preview {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.forecast-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

.forecast-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.forecast-card {
  min-width: 80px;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  padding: 15px 10px;
  transition: all 0.3s ease;
}

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

.forecast-time {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 8px;
  font-weight: 500;
}

.forecast-icon {
  font-size: 24px;
  margin: 8px 0;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forecast-temps {
  margin-top: 10px;
}

.temp-high-low {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.temp-label {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
}

.temp-value {
  font-size: 12px;
  font-weight: 700;
}

/* Horizontal Thermometer for Forecast */
.horizontal-thermometer {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  margin: 4px auto;
}

.horizontal-mercury {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #1e88e5 0%,
    #42a5f5 15%,
    #66bb6a 30%,
    #9ccc65 45%,
    #ffee58 60%,
    #ffb74d 75%,
    #ff8a65 85%,
    #ef5350 100%
  );
  transition: width 0.5s ease;
}

/* DAY/NIGHT WEATHER THEMES */
/* Sunny Day */
.sunny.day {
  background: linear-gradient(135deg, #ffd54f 0%, #ffe082 100%);
}

/* Sunny Night */
.sunny.night {
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 50%, #7986cb 100%);
}

/* Cloudy Day */
.cloudy.day {
  background: linear-gradient(135deg, #b0bec5 0%, #90a4ae 100%);
}

/* Cloudy Night */
.cloudy.night {
  background: linear-gradient(135deg, #37474f 0%, #546e7a 50%, #78909c 100%);
}

/* Rainy Day */
.rainy.day {
  background: linear-gradient(135deg, #546e7a 0%, #37474f 100%);
  color: #eceff1 !important;
}

/* Rainy Night */
.rainy.night {
  background: linear-gradient(135deg, #263238 0%, #37474f 50%, #455a64 100%);
  color: #eceff1 !important;
}

/* Night theme text adjustments */
.night .search-input,
.night .details-row,
.night .forecast-preview {
  background: rgba(255, 255, 255, 0.1);
  color: #eceff1;
}

.night .main-weather,
.night .top-bar {
  color: #eceff1;
}

.night .location-name,
.night .temperature,
.night .weather-description {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Rainy theme adjustments */
.rainy .search-input,
.rainy .details-row,
.rainy .forecast-preview {
  background: rgba(255, 255, 255, 0.1);
  color: #eceff1;
}

.rainy .main-weather,
.rainy .top-bar {
  color: #eceff1;
}

/* IMPROVED FOOTER STYLING */
footer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 3px solid rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 30px 25px;
    margin: 15px 0 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 25px;
    animation: slideInUp 0.8s ease-out;
    position: relative;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

footer a:hover {
    color: #004499;
    border-bottom: 2px solid #0066cc;
    transform: translateY(-1px);
}

/* Night footer adjustments */
.night footer {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.night footer a {
    color: #81d4fa;
}

.night footer a:hover {
    color: #b3e5fc;
    border-bottom-color: #81d4fa;
}

/* Scrollbar styling */
.dropdown::-webkit-scrollbar,
.forecast-scroll::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.dropdown::-webkit-scrollbar-track,
.forecast-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

.dropdown::-webkit-scrollbar-thumb,
.forecast-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.dropdown-item.active {
  background: rgba(255, 183, 0, 0.2);
  transform: translateX(5px);
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  .temperature {
    font-size: 60px;
  }

  .weather-icon {
    width: 100px;
    height: 100px;
  }

  .location-name {
    font-size: 20px;
  }

  .thermometer-tube {
    height: 60px;
  }

  .temp-scale {
    height: 60px;
  }
  
  footer {
    font-size: 15px;
    padding: 25px 20px;
    margin: 15px 0 0 0;
  }
}