* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: Arial, sans-serif;
  min-height: 100vh;
}

.search-container {
  text-align: center;
  margin: 30px auto;
  position: relative;
  max-width: 350px; 
}

input, button {
  padding: 12px 15px;
  font-size: 18px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
}

input {
  width: 100%; 
}

button {
  width: 100%;
  cursor: pointer;
  background-color: #007bff;
  color: white;
  border: none;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

.weather-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.info-astro {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.city-info {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  min-width: 300px;
}

.astro-info {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  min-width: 300px;
}

.city-info h2,
.astro-info h3 {
  margin-bottom: 15px;
  color: #333;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

.city-info p,
.astro-info p {
  margin: 8px 0;
  font-size: 16px;
  color: #555;
}

.day-wrapper {
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.forecast-today {
  margin-bottom: 20px;
}

.forecast-today h3 {
  font-size: 28px;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

.weather-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.weather-card img {
  width: 80px;
  height: 80px;
}

.weather-details {
  text-align: left;
  color: #444;
  font-weight: 500;
  line-height: 1.6;
}

.weather-details p {
  margin: 5px 0;
  font-size: 16px;
}

.hourly-title {
  font-size: 22px;
  color: #333;
  margin: 20px 0 15px 0;
  text-align: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.hourly-forecast {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 15px 5px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
}

.hour-card {
  min-width: 100px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 15px 10px;
  text-align: center;
  color: #333;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.hour-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hour-card p:first-child {
  font-weight: bold;
  color: #007bff;
  margin-bottom: 8px;
}

.hour-card img {
  width: 40px !important;
  height: 40px;
  margin: 8px 0;
}

.hourly-forecast::-webkit-scrollbar {
  height: 8px;
}

.hourly-forecast::-webkit-scrollbar-thumb {
  background: rgba(0, 123, 255, 0.3);
  border-radius: 4px;
}

.hourly-forecast::-webkit-scrollbar-track {
  background: transparent;
}

.suggestions-box {
  position: absolute;
  top: 100%; 
  left: 0;
  width: 100%; 
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #ccc;
  background: white;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  border-radius: 8px;
  box-sizing: border-box;
}

.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 16px;
  color: #222;
  transition: background-color 0.2s ease;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

.error-message {
  color: white;
  background-color: rgba(255, 0, 0, 0.8);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  margin: 20px auto;
  display: none;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.unit-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 5px;
  z-index: 1000;
}

.unit-btn {
  width: 50px !important;
  height: 40px;
  padding: 8px !important;
  font-size: 16px !important;
  font-weight: bold;
  border: 2px solid #007bff;
  border-radius: 6px;
  background-color: white;
  color: #007bff;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 !important;
}

.unit-btn:hover {
  background-color: #007bff;
  color: white;
}

.unit-btn.active {
  background-color: #007bff;
  color: white;
}