@font-face {
  font-family: "vazirmatn";
  src: url("./font/Vazirmatn-Black.woff2");
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'vazirmatn', sans-serif;
  background-color: #0b63a6;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100svh;
  height: auto;
}

.container {
  width: 80%;
  height: 50%;
  max-width: 900px;
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.error {
  font-size: 1.6rem;
  color: rgb(172, 0, 0);
  font-weight: bold;
}

form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  /* مهم */
  gap: 10px;
  /* فاصله بین فیلدها */
  margin-bottom: 20px;
  width: 100%;
}

form input[type="text"] {
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  color: #333;
  transition: all 0.3s ease;
  width: 250px;
  /* اندازه استاندارد */
  max-width: 90%;
  box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.205);
  font-family: sans-serif;
}

form input[type="text"]:focus {
  outline: none;
  box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.877);
}

form input[type="submit"] {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #333;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease-in-out;
  font-family: 'vazirmatn', sans-serif;
}

form input[type="submit"]:hover {
  background-color: #555;
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.4);
}

h1 {
  font-size: 3.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 30px;
}

.icon img {
  width: 100px;
  height: 100px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
}

.temperature {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 20px 0;
  color: #333;
}

.description {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #333;
}

.details {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #333;
}

.details div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 5px;
  margin: 10px;
  cursor: pointer;
  min-height: 45px;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.details div:hover {
  scale: calc(1.03);
}


/* پیش‌بینی هفتگی شروع*/
.weekly-forecast {
  margin-top: 35px;
}

.weekly-forecast h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #333;
}

.forecast-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 10px;
  scroll-behavior: smooth;
}

.forecast-card {
  flex: 0 0 110px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.forecast-card:hover {
  transform: translateY(-5px);
}

.forecast-card .day {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: #222;
}

.forecast-card img {
  width: 60px;
  height: 60px;
}

.forecast-card .temp {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 4px 0;
}

.forecast-card .desc {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.2;
}

/* اسکرول بار زیباتر */
.forecast-container::-webkit-scrollbar {
  height: 10px;
}

.forecast-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.forecast-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

/* پیش‌بینی هفتگی پایان*/


/*  موبایل کوچک */
@media (max-width: 480px) {
  form {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  form input[type="text"] {
    width: 75%;
    font-size: 1rem;
    padding: 12px;
    border-radius: 8px;
  }

  form input[type="submit"] {
    width: 75%;
    padding: 12px;
    font-size: 1.1rem;
    border-radius: 8px;
    margin: 0;
  }
}


/*  موبایل متوسط */
@media (max-width: 768px) {

  body {
    align-items: flex-start;
  }

  form {
    gap: 10px;
  }

  form input[type="text"] {
    font-size: 1.1rem;
    padding: 12px;
  }

  form input[type="submit"] {
    font-size: 1.1rem;
    padding: 12px 18px;
  }

  .forecast-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .container {
    width: 100%;
  }
}


/*  تبلت */
@media (max-width: 1024px) {

  form input[type="text"] {
    font-size: 1.15rem;
    padding: 12px;
  }

  form input[type="submit"] {
    font-size: 1.15rem;
  }

  .forecast-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
  }
}
