:root {
  --container-color: #ffffff;
  --text-color: #222222;
  --background-color: #f8f8f8;
  --accent-color: linear-gradient(140deg, #065143, #9ad4d6);
  --clear-day: linear-gradient(140deg, #89cff0, #f3e5ab);
  --cloudy-day: linear-gradient(140deg, #b0c4de, #848884);
  --rainy-day: linear-gradient(140deg, #4682b4, #2f4f4f);
  --sunrise-sunset: linear-gradient(140deg, #ff7f50, #ee82ee);
  --night: linear-gradient(140deg, #000080, #000000);
}
/* --- css reset --- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* mobile defaults */
body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: all 0.3s ease;
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  margin-bottom: 10rem;
}

/*utility classes*/

.container {
  width: 100%;
  max-width: 1100px;
  border-radius: 20px;
  padding: 0.75rem;
  text-align: center;
  margin: 0.5rem auto;
}

.container-other {
  height: auto;
  width: auto;
  max-width: 1100px;
  border-radius: 10px;
  text-align: center;
}

.container-outer {
  width: 90%;
  max-width: 1100px;
  margin: 1rem auto;
  background-color: var(--container-color);
  border-radius: 20px;
  padding: 1rem;
}

.flex {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 2%;
}

.frosted {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#error-message {
  color: red;
  font-style: italic;
}

/*header setup*/

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--container-color);
  height: 3rem;
  padding: 0 10% 0 10%;
  font-size: clamp(0.7rem, 2vw, 1rem);
}

.title {
  font-weight: 1000;
}

.portfolio-link {
  font-weight: 500;
}

.logo a {
  font-family: "Pacifico", sans-serif;
  background-image: var(--accent-color);
  color: transparent;
  background-clip: text;
}

.logo a:link,
.logo a:visited {
  font-family: "Pacifico", sans-serif;
  background-image: var(--accent-color);
  color: transparent;
  background-clip: text;
  text-decoration: none;
}

.back-to-portfolio-link:link,
.back-to-portfolio-link:visited {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 20px;
}

.back-to-portfolio-link:hover {
  color: var(--container-color);
  background-color: var(--text-color);
}

/*container setup*/

#input {
  background: transparent;
  outline: none;
  border: 1px solid black;
  padding: 10px;
  font-family: "Inter", sans-serif;
  margin-left: 2%;
  margin-right: 2%;
  border-radius: 10px;
  width: 100%;
  transition: all 0.3s ease;
}

#input:focus {
  box-shadow: 0 0 6px rgb(0, 0, 0);
}

#submit-button {
  border: 1px solid var(--text-color);
  background-color: var(--text-color);
  color: white;
  border-radius: 20px;
  padding: 10px;
  font-family: "Inter", sans-serif;
  transition: all 0.3s ease;
}

#submit-button:hover {
  cursor: pointer;
  background-color: white;
  color: var(--text-color);
}

#input-container {
  text-align: center;
  max-width: 500px;
}

#input-container-top {
  padding: 10px;
}

#results-container {
  background-image: var(--accent-color);
  color: var(--text-color);
  transition: all 0.3s ease;
}

img {
  width: 40%;
}

#container-main-left img {
  width: 90%;
}

.left-divider {
  border-radius: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}

.top-divider {
  border-radius: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

#container-main {
  max-height: 300px;
  max-width: 800px;
  margin-left: 0;
  margin-right: 1.25rem;
}

#container-other {
  min-width: 0;
  max-height: 8%;
}

#container-top-half {
  padding-bottom: 0;
  margin-bottom: 0;
}

#container-bottom-half {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding-top: 0;
  margin-top: 0;
  gap: 2%;
}

/*font sizes*/

#degrees {
  font-size: 2.5rem;
  font-weight: 700;
}
#description,
#place {
  font-size: 0.8rem;
  font-weight: 500;
}
#current-time-date,
#high-low,
#feels-like,
#humidity,
#wind,
#sunrise,
#sunset {
  font-size: 0.8rem;
  font-weight: 100;
  opacity: 0.8;
}

/*footer setup*/

footer {
  width: 100%;
  background-color: var(--text-color);
  color: #ccc;
  padding: 2rem 1rem;
  text-align: center;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

footer a {
  color: #ccc;
}

.copyright-text {
  font-size: 0.9rem;
  margin: 0;
}

@media (min-width: 768px) {
  #container-top-half {
    display: flex;
    align-items: center;
  }
  #container-other {
    min-width: 245px;
  }
  #container-bottom-half {
    grid-template-columns: repeat(4, 1fr);
  }
  #degrees {
    font-size: 4rem;
    font-weight: 700;
  }
  #description,
  #place {
    font-size: 1.2rem;
    font-weight: 500;
  }
  #container-main {
    min-height: 300px;
  }
}
