:root {
  --border-radius: 15px;
  --primary-text: rgba(0, 0, 0, 0.967);
  --muted-text: rgba(0, 0, 0, 0.7);
  --transition: all ease-in-out 350ms;
}
body {
  font-family: "Mona Sans", serif;
  background-image: radial-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, -0.5)),
    url("../media/clocks-1.jpg");
  background-size: cover;
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.hidden {
  display: none !important;
}
.world-clock-container,
.error-message,
.each-city,
footer {
  border-radius: var(--border-radius);
}
.world-clock-container,
footer {
  width: 85%;
  background-color: rgba(255, 255, 255, 0.906);
  box-shadow: 5px 5px 10px rgba(128, 128, 128, 0.3);
  max-width: 600px;
  text-align: center;
}
.world-clock-container {
  color: var(--primary-text);
  margin: 60px 0;
  padding: 20px 10px 41.5px;
}
select {
  background-color: rgba(221, 221, 221, 0.866);
  color: var(--muted-text);
  border-radius: calc(var(--border-radius) - 10px);
  font-weight: 600;
  padding: 10px;
}
select:hover {
  cursor: pointer;
}
.select-items {
  display: flex;
  justify-content: center;
}
#select-time-format {
  margin-right: 8px;
}
.user-greeting-display {
  font-family: "Merienda", serif;
  color: var(--muted-text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 10px 0;
  margin: 20px auto;
}
.user-greeting-display .seconds-display {
  display: none;
}
.cities {
  padding: 15px 5px 0;
  margin: auto 5px;
}
.each-city,
.error-message {
  background-color: rgb(174 174 174 / 40%);
  border: 1px solid rgba(207, 247, 247, 0.4);
  padding: 15px 20px 20px;
}
.error-message {
  width: 80%;
  margin: 40px auto 20px;
}
.each-city {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 10px 30px;
}
.city-and-date {
  text-align: left;
  margin-right: 10px;
}
.each-city h2 {
  margin: 0;
}
.date {
  color: var(--muted-text);
  font-size: 14px;
}
.time {
  font-family: "Roboto Mono", serif;
  display: flex;
  align-items: center;
  font-size: 33px;
  font-weight: 800;
}
.cities .time-suffix {
  opacity: 0.8;
  font-size: 18px;
  margin-left: 12px;
}
.switch-format,
#homepage-link {
  color: var(--muted-text);
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--transition);
  max-width: fit-content;
  margin: 0 auto;
}
.switch-format:hover,
#homepage-link:hover {
  color: var(--primary-text);
  font-size: 13.7px;
}
footer {
  color: var(--muted-text);
  font-size: 14px;
  padding: 20px 10px;
  margin: 0 auto 30px;
}
footer .clock-icon {
  background-color: #80808066;
  color: var(--primary-text);
  box-shadow: 0 0 1px #41404087;
  font-size: 19px;
  border-radius: 13px;
  position: relative;
  bottom: -4px;
}
footer a {
  font-weight: 600;
  color: var(--primary-text);
  transition: var(--transition);
}
footer a:hover {
  font-size: 14.3px;
  cursor: pointer;
  opacity: 0.9;
  text-decoration: none;
}

@media (max-width: 600px) {
  body {
    background-image: radial-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, -0.5)),
      url("../media/single-clock.jpg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
  .world-clock-container{
    opacity: 0.9;
  }
  h1 {
    font-size: 29px;
  }
  select{
    text-align: center;
  }
  .select-items {
    flex-direction: column;
  }
  #select-time-format {
    margin-right: 0;
    margin-bottom: 10px;
  }
  .each-city {
    flex-direction: column;
  }
  .city-and-date {
    text-align: center;
    margin-right: 0;
}
  .time {
    font-size: 26px;
  }
}

@media (max-width: 400px) {
  h1 {
    font-size: 26px;
  }
  .time {
    font-size: 24px;
  }
}
