* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  color: #333;
 
  background: #f8fafc;
}

.card {
   margin-top: 5vh;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 280px;
}

.navbar {
  background-color: rgb(255, 246, 246);

  height: 10vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;

  color: rgb(0, 0, 0);
}
#btn {
  height: 5vh;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

#a {
  margin-bottom: 19px;
}
.nav-links {
  margin-bottom: 17px;
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: rgb(0, 0, 0);
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input {
  padding: 8px;
  border: none;
  border-radius: 4px;
}

.search-form button {
  padding: 8px 15px;
  border: none;
  background: #3d87db;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}
.card h3 {
  margin-bottom: 15px;
}

.card ul {
  list-style: none;
}

.card li {
  margin-bottom: 8px;
}

.table-title {
  text-align: center;
  margin: 40px 0 20px;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
}

th {
  background: #1e293b;
  color: white;
}

#sunny {
  display: none;
}
#rainy {
  display: none;
}

#cloudy {
  display: none;
}

li {
  list-style: none;
}

#mist {
  display: none;
}

#rain-with-thunder {
  display: none;
}

#temp_c {
  font-size: 55px;
}

img {
  height: 20vh;
  width: 9.9vw;
}

#span {
  margin-right: 12px;
  margin-top: 15px;
  font-size: 40px;
  margin-left: 15px;
}

#snowfall {
  display: none;
}

#error {
  font-size: 14px;
  color: red;
  display: none;
  text-align: center;
  margin-left: 0.3vw;
}

#invalid-input {
  font-size: 14px;
  display: none;
  text-align: center;
  color: red;
  display: none;
  margin-right: 4.5vw;
  margin-left: 0.3vw;
}

#error-box {
  display: flex;
  flex-direction: column;
  height: 3vh;
  margin-right: 2vw;
  margin-bottom: 3vh;
}

#box {
  height: 11vh;
  display: flex;
  width: 18vw;
  flex-wrap: wrap;
  display: flex;
}

#input,
#btn {
  margin-top: 1.5vh;
  height: 5vh;
  border-radius: 7px;
}

#temp_c {
  font-size: 60px;
}

#country {
  font-size: 28px;
  font-weight: bolder;
}
.weather-title {
  font-size: 28px;
  text-align: center;
  margin-bottom: 20px;
}

.img-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 6vh;
  height: 45vh;
}

.container {
  width: 99vw;
  padding: 20px;
}

.res {
  font-weight: bolder;
}

#btn {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.card-wrapper {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  width: 77vw;
  margin: auto;
}


#bold {
  text-decoration: underline;
}

@media (min-width: 320px) and (max-width: 768px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 15px;
    text-align: center;
    height: 32vh;
  background: #f8fafc;
  
}
    
     

  #box {
    width: 77vw;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    height: auto;
  }
  .nav-left {
    flex-direction: column;
    gap: 10px;
  }

  #btn,
  #input {
    width: 55vw;
 box-shadow: 0 0.1px 1px rgba(0, 0, 0, 0.1);
  }

  #input {
    width: 56vw;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .container {
    width: 100%;
    padding: 15px;
  }

  .img-section {
    height: auto;
    margin-top: 3vh;
  }

  img {
    width: 40%;
    height: auto;
    max-width: 150px;
  }

  #temp_c {
    font-size: 40px;
    text-align: center;
  }

  #span {
    font-size: 25px;
  }

  #country {
    font-size: 28px;
    text-align: center;
  }

  .card-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 82vw;
    gap: 15px;
  }

  .card {
    width: 50vw;
    margin-top: 2vh;
  }

  #error-box {
    margin-right: 0;
    align-items: center;
  }

  .weather-title,
  #country {
    font-size: 18px;
  }
  #invalid-input {
    width: 56vw;
    margin-left: 16px;
  }
}
@media (min-width: 769px) and (max-width: 1200px) {
  #box {
    width: 35vw;
  }
  .navbar {
    padding: 15px 20px;
  }
  #input,
  #btn {
    height: 4.8vh;
  }

  .card-wrapper {
    flex-wrap: wrap;
    width: 60vw;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .card {
    width: 50vw;
    margin-top: 3vh;
  }

  img {
    width: 120px;
    height: auto;
  }

  #temp_c {
    font-size: 50px;
  }

  #span {
    font-size: 32px;
  }
}
@media (min-width: 1201px) and (max-width: 1600px) {
  #box {
    width: 24vw;
  }

  .card-wrapper {
    width: 90%;
  }

  .card {
    width: 30%;
  }

  img {
    width: 150px;
    height: auto;
  }
}

@media (min-width: 1601px) and (max-width: 2700px) {
  #input,
  #btn {
    margin-top: 30px;
  }

  #btn {
    width: 4vw;
  }

  .card-wrapper {
    width: 70%;
  }

  .card {
    font-size: 22px;
    height: 18vh;
    width: 30%;
  }
}
