/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* ===== Body Styling ===== */
body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #74ebd5, #acb6e5);
}

/* ===== Weather Box ===== */
.weather-box {
  width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  padding: 25px;
  position: relative;
}

/* ===== Search Box ===== */
.search-box {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  background: #f1f1f1;
  border-radius: 8px;
  padding: 0 10px;
  height: 45px;
  box-sizing: border-box;
}

/* ===== Input Field ===== */
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #333;
  height: 100%;
  padding: 0 8px;
  border-radius: 6px;
}

/* ===== Search Button ===== */
.search-box button {
  border: none;
  background: #007bff;
  color: #fff;
  padding: 8px 8px;
  border-radius: 6px;
  margin-left: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 300;
  transition: 0.3s ease;
}

.search-box button:hover {
  background: #0056b3;
}

/* ===== Weather Icon ===== */
.weather-icon {
  width: 120px;
  margin: 10px auto;
}

/* ===== Temperature and Description ===== */
.temperature {
  font-size: 50px;
  font-weight: 600;
  color: #333;
  margin-top: 10px;
}

.description {
  font-size: 18px;
  color: #666;
  text-transform: capitalize;
}

/* ===== Details Section ===== */
.details {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  text-align: left;
}

.details div {
  flex: 1;
}

.details span {
  display: block;
  font-size: 14px;
  color: #888;
}

.details p {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

/* ===== Error Highlight ===== */
.error {
  border: 2px solid red !important;
  background-color: #ffecec;
}

/* ===== Modal Styling ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: pop 0.3s ease;
}

.modal-content h3 {
  color: #e74c3c;
  margin-bottom: 10px;
}

.modal-content p {
  color: #333;
  margin-bottom: 20px;
}

.modal-content button {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.modal-content button:hover {
  background: #0056b3;
}

/* ===== Modal Animation ===== */
@keyframes pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
