/* ------------------------------
   Base & Layout
------------------------------ */
body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  /* Fairytale gradient background */
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
  background-attachment: fixed;
}

#screen {
  width: 380px;
  max-width: 95%;
  padding: 20px;
  border-radius: 25px;

  /* Glassmorphism effect */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ------------------------------
   Header
------------------------------ */
h3 {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9),
               0 0 25px #66a6ff,
               0 0 45px #89f7fe;
}

/* ------------------------------
   Search Bar
------------------------------ */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 10px 15px;
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.search-icon {
  color: #ffd166;
  font-size: 18px;
}

.searchinput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
}

.searchinput::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* ------------------------------
   Messages
------------------------------ */
.message,
.error-message {
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  text-align: center;
}

.message {
  background: rgba(255, 255, 255, 0.15);
  color: #e0f7fa;
}

.error-message {
  background: rgba(255, 99, 132, 0.2);
  color: #ff6b81;
  display: none; /* hidden by default */
}

/* ------------------------------
   Weather Result
------------------------------ */
.return {
  margin-top: 10px;
}

.box {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 15px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.weather-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.name {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.weather-temp {
  font-size: 30px;
  font-weight: bold;
}

.weather-icon img {
  width: 60px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

/* ------------------------------
   Weather Description Rows
------------------------------ */
.weather-desc {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
  gap: 10px;
}

.desc-box {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease;
}

.desc-box:hover {
  transform: translateY(-5px);
}

.desc-icon {
  font-size: 20px;
  margin-bottom: 5px;
  color: #ffd166;
}

.desc-name {
  font-size: 13px;
  opacity: 0.9;
}

.desc-info {
  font-size: 14px;
  font-weight: 600;
}

/* ------------------------------
   Bottom Navigation
------------------------------ */
nav ul {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  list-style: none;
}

nav li {
  list-style: none;
}

nav a {
  color: #fff;
  font-size: 22px;
  transition: all 0.3s ease;
}

nav a.active,
nav a:hover {
  color: #ffd166;
  transform: scale(1.2);
}
