/* To make sure html and body take full height */
/* Global Reset */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Body Layout */
body {
  display: flex;
  justify-content: center;
  align-items: flex-start;  /* Aligns container to top */
  min-height: 100vh;        /* Allows full screen height */
  overflow-y: auto;
  padding: 30px 15px;       /* Padding prevents clipping on small screens */
  background: linear-gradient(to right, #2e8eeff7, #021447);
  font-family: 'Open Sans', sans-serif;
 }

/* Main Card Box */
.container {
  background: linear-gradient(to right, #85a5f0, #f3d7d7);
  text-align: center;
  color: rgb(41, 0, 130);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
  border-radius: 30px;
  max-width: 400px;
  width: 90%;
  overflow: hidden;
  margin: 0 auto;
  padding: 1rem;
} 


.datetime-container {
  text-align: center;
  background: none;
  padding: 0px 10px;
}

.datetime-part {
  margin: 10px 0;
}

/* Style for Day */
.day {
  font-size: 2em;
  color: #321179;
  font-weight: bold;
}

/* Style for Date */
.date {
  font-size: 1.6em;
  font-weight: bolder;
  font-family:  Helvetica, Verdana, sans-serif;
  color: #d10894;
}

/* Style for Time */
.time  {
  font-size: 1.8em;
   font-weight: bolder;
  color: #321179;
  font-family: 'Trebuchet MS', sans-serif;
}

hr {
  border: none;
  border-top: 3px double #6d0909;
  color: #0c053b;
  overflow: visible;
  text-align: center;
  height: 5px;
}

hr::after {
  background: #fff;
  padding: 0 10px;
  position: relative;
  top: -14px;
}

.input-zone{
 display:flex;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
 }

.input-zone input {
  flex: 1;
  min-width:0;
  padding: 0.5rem;
 /* margin-right: 10px;*/
  border-radius: 10px;
  background-color: azure;
  border-color: azure;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.input-zone button {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 10px;
  background-color:#b0c1e9 ;
  border: none;
  border-color: #b0c1e9;
  font-size: 1rem;
}

.input-zone button:hover {
  background-color: #91abdf;
}

.input-zone input:focus {
  outline: none;
  box-shadow: 0 0 5px #85a5f0;
}

.input-zone button {
  transition: background-color 0.3s ease;
}

#weather {
  margin-top: 10px;
  font-size: 1.4em;
}

#weather h2 {
  font-size: 2em;
  margin-bottom: 10px;
}

#weather p {
  margin: 10px 0;
  font-size: 1.2em;
}
#weather small {
  color: #321179;
  font-family: 'Trebuchet MS';
  margin-top: 20px;
}

.icon-description {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
}

#weatherIcon {
  width: 70px;
  height: 70px;
}

/* 1. Fix layout on very small mobile screens */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: 15px;
  }

  .container {
    padding: 0.8rem;
    border-radius: 20px;
  }

  .input-zone {
    align-items: stretch;
    flex-direction: row;
  }

  .input-zone input,
  .input-zone button {
    width: auto;
    margin: 0;
  }

  #weather h2 {
    font-size: 1.6em;
  }

  #weather p {
    font-size: 1em;
  }

  .day {
    font-size: 1.5em;
  }

  .date {
    font-size: 1.3em;
  }

  .time {
    font-size: 1.4em;
  }

  #weatherIcon {
    width: 60px;
    height: 60px;
  }

  .icon-description {
    flex-direction: column;
    gap: 10px;
  }
}

/*2. Smooth scaling on tablets
Add a breakpoint for tablets to slightly increase the layout size:*/
@media (min-width: 768px) {
  .container {
    max-width: 500px;
  }

  #weatherIcon {
    width: 90px;
    height: 90px;
  }
}
