html, body {
  margin: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;  
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
       user-select: none;
}

body {
  background-image: url('bg.jpg');
}

content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
  -webkit-box-pack: space-evenly;
      -ms-flex-pack: space-evenly;
          justify-content: space-evenly;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-transition: opacity 1.5s;
  -o-transition: opacity 1.5s;
  transition: opacity 1.5s;
}

content > * {
  z-index: 2;
}

.envelope-container {
  width: 30vw;
  min-width: 300px;
  height: 300px;
  text-align: center;
}

.envelope-icon {
  font-size: 250px;  
  line-height: 300px;
  -webkit-animation: glowingAnimation 0.5s linear infinite alternate;
          animation: glowingAnimation 0.5s linear infinite alternate;
  -webkit-transition: font-size 0.3s, line-height 0.3s;
  -o-transition: font-size 0.3s, line-height 0.3s;
  transition: font-size 0.3s, line-height 0.3s;
}

.envelope {
  cursor: pointer;
  display: inline-block;
  position: relative;
}

.envelope:hover .envelope-icon {
  font-size: 300px;
}

.envelope:hover .envelope-no {
  font-size: 3.6em;
  top: 15%;
}

.envelope:hover:hover .condition-text {
  opacity: 1;
  -webkit-transition: opacity 0.3s;
  -o-transition: opacity 0.3s;
  transition: opacity 0.3s;
}

.envelope-no {
  position: absolute;
  left: 15%;
  top: 20%;
  font-size: 3em;
  text-shadow: 0 0 10px black;
  -webkit-transition: font-size 0.3s, top 0.3s;
  -o-transition: font-size 0.3s, top 0.3s;
  transition: font-size 0.3s, top 0.3s;
}

#envelope-1 .envelope-icon, #envelope-1 .envelope-no {
  color: pink;
}


#envelope-2 .envelope-icon, #envelope-2 .envelope-no {
  color: salmon;
}


#envelope-3 .envelope-icon, #envelope-3 .envelope-no {
  color: purple;
}


#envelope-4 .envelope-icon, #envelope-4 .envelope-no {
  color: saddlebrown;
}


#envelope-5 .envelope-icon, #envelope-5 .envelope-no {
  color: slategrey;
}


#envelope-6 .envelope-icon, #envelope-6 .envelope-no {
  color: forestgreen;
}


#envelope-7 .envelope-icon, #envelope-7 .envelope-no {
  color: royalblue;
}


#envelope-8 .envelope-icon, #envelope-8 .envelope-no {
  color: orange;
}


#envelope-9 .envelope-icon, #envelope-9 .envelope-no {
  color: #87d8f7;
}

.condition-text {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  opacity: 0;
  -webkit-transition: opacity 0.3s;
  -o-transition: opacity 0.3s;
  transition: opacity 0.3s;
  font-family: "Schoolbell", serif;
  font-weight: 400;
  font-style: normal;
  background-color: lightgoldenrodyellow;
  -webkit-box-shadow: 0 0 30px 0 black;
          box-shadow: 0 0 30px 0 black;
  padding: 10px;
  width: 300px;
}

.big-envelope {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  text-align: center;
  -webkit-transition: opacity 1.5s;
  -o-transition: opacity 1.5s;
  transition: opacity 1.5s;
}

.big-envelope, .big-envelope > * {
  z-index: 1;
}

.big-envelope .fa-envelope { 
  position: fixed;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  font-size: calc(100vmin * 0.9);
  color: white;
}

.big-envelope #surprise-text {
  position: fixed;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%) rotate(15deg);
      -ms-transform: translate(-50%, -50%) rotate(15deg);
          transform: translate(-50%, -50%) rotate(15deg);
  font-family: "Schoolbell", serif;
  font-weight: 400;
  font-style: normal;
  font-size: calc(100vmin * 0.03);
  background-color: lightgoldenrodyellow;
  -webkit-box-shadow: 0 0 30px 0 black;
          box-shadow: 0 0 30px 0 black;
  padding: 30px;
  opacity: 0.9;
  max-width: 80vh;
  -webkit-user-select: text;
  -ms-user-select: text;
  -moz-user-select: text;
       user-select: text;
}

@-webkit-keyframes glowingAnimation {
  0% {
    text-shadow: 0 0 5px white;
  }
  100% {
    text-shadow: 0 0 40px white;
  }
}

@keyframes glowingAnimation {
  0% {
    text-shadow: 0 0 5px white;
  }
  100% {
    text-shadow: 0 0 40px white;
  }
}


@media (max-width: 1440px) {
  .big-envelope #surprise-text {
    /*font-size: 1.5em;*/
  }
}

@media (max-width: 1024px), (max-height: 800px) {
  .big-envelope #surprise-text {
    padding: 2px;
  }
}
