body {
  position: relative;
  background-color: #ffeac3;
  color: #434343;
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* --------------------------- Splash Screen ---------------------------  */
#splash-body {
  position: fixed;
  display: flex;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  justify-content: center;
  align-items: center;
  background-color: #ff2f2f;
  z-index: 999;
}

#ulamo-logo {
  height: 100px;
}

/* --------------------------- Home ---------------------------  */
#main-div {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Nav Bar */
#nav-div {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding-inline: 20px;
  padding-top: 10px;
  z-index: 1;
}

#title-div {
  display: flex;
  align-items: center;
  gap: 8px;
}

#title {
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
}

#title-logo {
  font-size: 2.5rem;
}

#menu-button {
  width: 28px;
  border-color: transparent;
  font-size: 0.8rem;
  color: white;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  cursor: pointer;
}

#menu-button:active {
  transform: scale(0.96);
}

#menu-button.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

#header {
  text-align: center;
  font-weight: 200;
  font-size: 1.8rem;
  margin-bottom: 24px;
}

#main-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  gap: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#footer-home {
  position: absolute;
  font-size: 12px;
  bottom: 5px;
}

#footer-a-home {
  color: black;
  cursor: pointer;
  text-decoration: none;
}

#footer-modal {
  font-size: 12px;
  margin-bottom: 10px;
}

#footer-b {
  color: black;
  cursor: pointer;
  text-decoration: none;
}

/* --------------------------- Roulette ---------------------------  */
#main-roulette {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 180px;
}

#roulette {
  position: fixed;
  width: 340px;
}

#roulette-border {
  position: fixed;
  width: 350px;
}

#center-roulette {
  position: fixed;
  width: 195px;
}

#picker {
  position: fixed;
  width: 55px;
  margin-top: -300px;
}

/* Spin Button */
#button-wrapper {
  display: flex;
  justify-content: center;
}

#spin {
  font-size: 14px;
  color: white;
  height: 45px;
  width: 100px;
  border-color: transparent;
  border-radius: 12px;
  background-color: #ff2f2f;
  box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.24);
  margin-top: 200px;
  cursor: pointer;
}

#spin,
#done-button button {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

button:active {
  transform: scale(0.96);
}

/* --------------------------- Ulam Modal  ---------------------------  */
#ulam-bg {
  position: fixed;
  top: 0;
  left: 0;
  background-color: black;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  height: 100%;
  width: 100%;
  z-index: 9;
}

#ulam-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  height: 600px;
  width: 320px;
  background-color: #ffeac3;
  border-radius: 24px;
  margin: 0;
  z-index: 20;
}

#ulam-bg.show {
  opacity: 0.81;
}

#ulam-div.show {
  opacity: 1;
}

#ulam-bg.closing,
#ulam-div.closing {
  opacity: 0;
}

#ulam-today {
  font-size: 24px;
  margin-top: 30px;
}

#scroll-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  margin: 0;
}

#ulam-img {
  height: 155px;
  border-radius: 8px;
}

#ulam-name {
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  margin-top: 10px;
}

#ulam-description {
  font-size: 14px;
  text-align: center;
  margin-inline: 18px;
  margin-bottom: 15px;
}

#ulam-ingredients-title,
#ulam-instructions-title {
  font-size: 24px;
  font-weight: 500;
  margin: 0;
}

#ulam-ingredients {
  list-style-type: disc;
  list-style-position: outside;
  padding-left: 20px;
  margin: 0;
  margin-top: 5px;
  margin-inline: 10px;
  margin-bottom: 15px;
  font-size: 14px;
  text-align: start;
  max-width: 240px;
  width: 100%;
}

#ulam-instructions {
  list-style-type: decimal;
  list-style-position: outside;
  padding-left: 20px;
  margin: 0;
  margin-top: 5px;
  margin-bottom: 15px;
  margin-inline: 10px;
  font-size: 14px;
  text-align: start;
  max-width: 240px;
  width: 100%;
}

#ulam-ingredients li,
#ulam-instructions li {
  margin-left: 0;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: normal;
  text-align: left;
}

#source-text {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 24px;
}

#done-button {
  font-size: 14px;
  color: white;
  height: 45px;
  width: 100px;
  border-color: transparent;
  border-radius: 12px;
  background-color: #ff2f2f;
  box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.24);
  text-align: center;
  min-height: 45px;
  max-height: 45px;
  margin-bottom: 50px;
  cursor: pointer;
}

/* Loading Effect */
#spin {
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

#spin.loading {
  pointer-events: none;
  color: white;
}

#spin.loading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background-color: white;
  animation: loadBar 8s linear forwards;
}

@keyframes loadBar {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* --------------------------- Ulam Grid ---------------------------  */
#grid-bg {
  position: fixed;
  display: flex;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.81);
  transition: opacity 0.4s ease, transform 0.4s ease;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}

#grid-bg.show {
  opacity: 0.81;
}

#ulam-grid-div {
  position: fixed;
  display: flex;
  flex-direction: row;
  top: 0;
  right: 0;
  height: 100vh;
  transform: translateX(100%);
  transition: transform 0.5s ease;
  z-index: 4;
}

#ulam-grid-div.show {
  transform: translateX(0);
}

#ulam-grid {
  overflow-y: auto;
  scroll-behavior: smooth;
}

.picked-ulam-name {
  display: flex;
  color: white;
  font-weight: 500;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;
  height: 50px;
  width: 300px;
  margin: 0;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.picked-ulam-name:active {
  transform: scale(1.03);
}

/* ------------------------ Media Queries ------------------------ */

/* Extra small devices (phones in portrait) */
@media (max-width: 375px) {
  #header {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  #roulette {
    width: 320px;
  }

  #roulette-border {
    width: 330px;
  }

  #center-roulette {
    width: 190px;
  }

  #picker {
    width: 55px;
    margin-top: -270px;
  }

  #spin {
    margin-top: 170px;
  }

  .picked-ulam-name {
    width: 270px;
  }
}

@media (min-width: 576px) {
  #header {
    font-size: 1.8rem;
    margin-bottom: 120px;
  }

  #roulette {
    width: 550px;
  }

  #roulette-border {
    width: 560px;
  }

  #center-roulette {
    width: 325px;
  }

  #picker {
    width: 75px;
    margin-top: -490px;
  }

  #spin {
    margin-top: 290px;
  }
}

@media (min-width: 768px) {
  #ulam-div {
    height: 640px;
    width: 520px;
  }

  #ulam-description {
    margin-inline: 40px;
    margin-bottom: 15px;
  }

  #ulam-ingredients,
  #ulam-instructions {
    max-width: 350px;
  }
}

@media (min-width: 1440px) {
  #header {
    font-size: 1.8rem;
    margin-bottom: 120px;
  }

  #roulette {
    width: 550px;
  }

  #roulette-border {
    width: 560px;
  }

  #center-roulette {
    width: 325px;
  }

  #picker {
    width: 75px;
    margin-top: -490px;
  }

  #spin {
    margin-top: 290px;
  }

  #ulam-div {
    height: 640px;
    width: 520px;
  }

  #ulam-description {
    margin-inline: 40px;
    margin-bottom: 15px;
  }

  #ulam-ingredients,
  #ulam-instructions {
    max-width: 350px;
  }
}

/* For Nest Hub */
@media (width: 1024px) and (height: 600px) {
  #header {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  #roulette {
    width: 410px;
  }

  #roulette-border {
    width: 420px;
  }

  #center-roulette {
    width: 260px;
  }

  #picker {
    width: 55px;
    margin-top: -360px;
  }

  #spin {
    margin-top: 220px;
  }

  #ulam-div {
    height: 500px;
  }
}

@media (width: 1280px) and (height: 800px) {
  #header {
    font-size: 1.8rem;
    margin-bottom: 100px;
  }

  #roulette {
    width: 510px;
  }

  #roulette-border {
    width: 520px;
  }

  #center-roulette {
    width: 300px;
  }

  #picker {
    width: 65px;
    margin-top: -450px;
  }

  #spin {
    margin-top: 280px;
  }
}
