@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* ===============================
  Base & Utility STYLES
=============================== */
*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: "Open Sans", sans-serif;
  color: #424242;
}

body {
    background-color: #54f6a0;
}

h1 { 
  font-family: 'VT323', monospace;
  font-size: 3rem;
  padding: 1rem;
}

h2 { 
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.wrapper {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  min-height: 100vh;
}

.hide { 
  display: none;
}


/* ===============================
  Flex STYLES
=============================== */
.flex-container {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.space-between {
  justify-content: space-between;
}

.space-evenly { 
  justify-content: space-evenly;
}
.center {
  align-items: center;
  justify-content: center;
}

.col-1 { 
  flex-basis: 8%;
}

.col-10 {
  flex-basis: 83%;
}

/* ===============================
  Control Panel
=============================== */
button { 
  cursor: pointer;
}
button, .btn {
  display: inline-block;
  width: 200px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  background-color: rgba(251, 248, 236, 0.75);
  height: 35px;
  line-height: 35px;
  padding: 0 1.5rem;
  color: #424242;
  font-size: 1.5rem;
  font-family: 'VT323', monospace;
  font-weight: 600;
  letter-spacing: .8px;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
  outline: none;
  border: none;
  border-radius: 2px;
  -webkit-transition: all .3s ease-out;
  transition: all .3s ease-out;
  box-shadow: 0 2px 5px 0 rgb(0 0 0 / 23%);
}

button:hover { 
  background-color: rgba(251, 248, 236, 1) ;
    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%);
}

button:active { 
 transform: translateY(4px);
}



/* ===============================
  Tamagotchi STYLES
=============================== */

main { 
    background: url('../assets/park-background.webp') no-repeat center center;
    padding: 2rem;
}
.tamagotchi-wrapper { 
  height: 50vh;
  position: relative;
}

#tamagotchi { 
  height: 100%;
}

#tamagotchi img {
  max-width: 20%;
  margin-bottom: -100px;
}

.shadow {
  position: absolute;
  left: 20px;
  bottom: 10px;
  width: 100px;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  animation: boingShadow 1s ease-in-out infinite alternate;
}

.egg {
  margin: 20px 20px -100px 20px;
  width: 100px;
  height: 125px;
  background-color: #faf3c0;
  border: 1px solid #000;
  border-top-left-radius: 50% 60%;
  border-top-right-radius: 50% 60%;
  border-bottom-left-radius: 50% 40%;
  border-bottom-right-radius: 50% 40%;
  transform-origin: center bottom;
  animation: boing 1s ease-in-out infinite alternate;
  box-shadow: inset -5px -10px rgba(168, 164, 176, 0.5);
}

.spots {
  position: absolute;
  left: 30px;
  top: 20px;
  height: 15px;
  width: 10px;
  background-color: #a8a4b0;
  border-top-left-radius: 60% 60%;
  border-top-right-radius: 40% 40%;
  border-bottom-left-radius: 40% 40%;
  border-bottom-right-radius: 60% 60%;
}
.spots:before {
  position: absolute;
  left: -10px;
  top: 16px;
  content: '';
  display: block;
  height: 13px;
  width: 7px;
  background-color: #a8a4b0;
  border-top-left-radius: 60% 60%;
  border-top-right-radius: 40% 40%;
  border-bottom-left-radius: 40% 40%;
  border-bottom-right-radius: 60% 60%;
}
.spots:after {
  position: absolute;
  left: 0px;
  top: 25px;
  content: '';
  display: block;
  height: 10px;
  width: 5px;
  background-color: #a8a4b0;
  border-top-left-radius: 60% 60%;
  border-top-right-radius: 40% 40%;
  border-bottom-left-radius: 40% 40%;
  border-bottom-right-radius: 60% 60%;
}

@keyframes boing {
  from {
    transform: scale(1, 1) translateY(-20px);
  }
  to {
    transform: scale(1.2, 0.8) translateY(0px);
  }
}
@keyframes boingShadow {
  from {
    transform: scale(0.9, 1);
  }
  to {
    transform: scale(1.2, 0.8);
  }
}
  
/* Sleeping Styles  */
/* Sleep Animation Reference: https: //codepen.io/Charlie-93/pen/mqxWWJ?editors=1100 */

.z-container { 
  position: absolute;
  top: 10%;
  left: 60%;
  transform: translate(50%, -50%);
}
.zzz {
  animation-name: zzz;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-direction: forwards;
  color: rgba(160, 84, 246, 1);
  font-weight: bold;
  position: absolute;
  z-index: 100;
  transform: translateY(100%);
}

.zzz-z {
  animation-delay: 0s;
  top: 100px;
  right: 20px;
}

.zzz-zz {
  animation-delay: 1s;
  top: 50px;
  right: -60px;
}

.zzz-zzz {
  animation-delay: 2s;
  top: 10px;
  right: -100px;
}

@keyframes zzz {
  0% {
    color: rgba(160, 84, 246, 0);
    font-size: 30px;
    -webkit-transform: translateY(100%);
    transform: translateY(100%);
  }

  100% {
    color: rgba(160, 84, 246, 1);
    font-size: 72px;
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
  }
}


/* ===============================
  Modal
=============================== */
.modal { 
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(255, 255, 255);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-inner { 
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f9d2c5;
  box-shadow: 4px 1px 10px 0px #dadada;
  border-radius: 4px;
  padding: 3rem 3rem 1rem 3rem;
}

.modal-inner * {
  margin-bottom: 1.5rem;
}
