* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --main-color: rgb(173, 216, 230);
  --primary-color: rgb(173, 216, 250);
  --secondary-color: antiquewhite;
}
body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  min-height: 100vh;
}

/* Header styles */
.header {
  text-align: center;
  padding: 30px 20px 20px;
  color: white;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0;
}
.nav {
  width: 100%;
  height: auto;
  padding: 20px 0;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.nav input {
  padding: 12px 16px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  outline: none;
  background-color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  transition: all 0.3s ease;
}
.nav input:focus {
  border: 2px solid rgba(255, 255, 255, 0.8);
  background-color: white;
  transform: scale(1.02);
}
.btnSearch {
  padding: 12px 20px;
  background: linear-gradient(135deg, #00b894, #00a085);
  color: white;
  border: none;
  border-radius: 25px;
  margin-left: 15px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}
.btnSearch:hover {
  background: linear-gradient(135deg, #00a085, #00b894);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}
.weather-card {
  width: 50%;
  max-width: 500px;
  height: auto;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  color: white;
  margin: 50px auto;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.weather-card div {
  padding: 10px;
}
.country {
  font-size: 25px;
  font-weight: 600;
}
.degree {
  font-size: 50px;
  font-weight: 400;
}
.info-weather {
  font-size: 18px;
  text-align: center;
}
.info-weather p {
  font-size: 16px;
}
.info-weather h4 {
  padding: 10px 0;
}

/* Loading styles */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.loading-state .weather-content {
  opacity: 0.3;
}

/* Weather icon styles */
.status {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 10px 0;
}

.status img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Map link styles */
#map-link {
  color: white;
  text-decoration: underline;
  margin-top: 10px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

#map-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .weather-card {
    width: 90%;
    margin: 50px auto;
  }

  .nav {
    padding: 15px;
  }

  .nav input {
    width: 200px;
  }
}

/* Input improvements */
.nav input {
  font-size: 16px;
  width: 250px;
}

.nav input::placeholder {
  color: #999;
}

/* Button improvements */
.btnSearch {
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btnSearch:active {
  transform: translateY(1px);
}

/* Weather details styling */
.weather-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.weather-details p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
}

.weather-details span {
  font-weight: bold;
}

/* Location icon styling */
.location-icon {
  margin-right: 8px;
  font-size: 20px;
}

/* Error state */
.weather-card.error {
  background-color: #ff6b6b;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.error-message {
  color: #ff6b6b;
  background-color: rgba(255, 107, 107, 0.1);
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
}

/* Improved responsive design */
@media (max-width: 768px) {
  .weather-card {
    width: 90%;
    margin: 30px auto;
    padding: 15px;
  }

  .nav {
    padding: 15px;
    flex-direction: column;
    gap: 10px;
  }

  .nav input {
    width: 280px;
  }

  .btnSearch {
    width: 100px;
  }

  .degree {
    font-size: 40px;
  }

  .country {
    font-size: 20px;
  }

  .weather-details p {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Animation for smooth transitions */
.weather-content {
  transition: all 0.3s ease;
}

.weather-card {
  transition: all 0.3s ease;
}

/* Hover effects */
.weather-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
