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

.hidden {
  display: none;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 98vh;
  background-color: rgb(52, 58, 64);
}

.birthdayCard {
  position: relative;
  max-width: 30rem;
  width: 90vw;
  min-height: 80vh;
  height: 80vh;
  cursor: pointer;
  transform-style: preserve-3d;
  transform: perspective(2500px);
}

.cardFront * {
  transition-duration: 1s;
}

.cardFront {
  position: relative;
  width: 100%;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  margin-bottom: 2rem;

  transform-origin: 0 100%;
  -moz-transform-origin: 0 100%;
  -webkit-transform-origin: 0 100%;

  transition-duration: 1s;
  -moz-transition-duration: -moz-transform 1s linear;
  -webkit-transition-duration: -webkit-transform 1s linear;

  background-color: #ff5555;
  box-shadow: inset 100px 20px 100px rgba(0, 0, 0, 0.2),
    30px 0 50px rgba(0, 0, 0, 0.4);
}

#front,
#back {
  position: absolute;
  height: 100%;
  width: 100%;
}

#back {
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotate(180deg) rotateY(180deg);
  background-color: #ff5555;
}

.opened {
  transform: rotateX(-160deg);
  border-bottom: 1px solid grey;
}

.hide {
  opacity: 0;
  z-index: -1;
}

.happy {
  padding: 0.2rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  height: 100%;
  font-family: Tahoma, sans-serif;
  font-style: italic;
  font-size: 4rem;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15),
    1px 1px 0 rgba(255, 200, 200, 255), 2px 2px 0 rgba(255, 150, 150, 255),
    3px 3px 0 rgba(255, 125, 125, 255);
  color: #fff;
}

.happy > div {
  display: flex;
  flex-wrap: wrap;
}

.cardBtn {
  position: absolute;
  bottom: 5rem;
  right: 5rem;
  background: #f44;
  color: #fff;
  font-family: Tahoma, sans-serif;
  font-style: italic;
  font-weight: bold;
  font-size: 1em;
  border-radius: 0.5rem;
  z-index: 10;
  padding: 0.5em;
  border: none;
  cursor: pointer;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.4);
  -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25),
    0 0 1px rgba(0, 0, 0, 0.4);
}

.cardBtn:hover {
  background: #f22;
}

.cardInside {
  overflow: auto;
  position: absolute;
  background-color: #fff;
  width: 100%;
  height: 100%;
  z-index: -1;
  left: 0;
  top: 0;
  box-shadow: inset 100px 20px 100px rgba(0, 0, 0, 0.2);
}

.cardInside p {
 font-family:  Tahoma, sans-serif;
 text-align: justify;
  font-size: 1rem;
  margin: 2rem 1.5rem;
  color: #333;
}

p.name {
  text-align: right;
  margin: 1.5rem;
  color: #333;
}

.head {
  font-family: Tahoma, sans-serif;
  color: #333;
  text-align: center;
  margin: 30px;
  outline-color: #333;
  outline-style: dotted;
}

.website {
  text-decoration: none;
  text-transform: uppercase;
  color:whitesmoke;
  font-size: 2rem;
}

/* Timer */
#timerBox h1 {
  font-family: Tahoma, sans-serif;
  text-align: center;
  font-size: 2.5rem;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15),
    1px 1px 0 rgba(255, 200, 200, 255), 2px 2px 0 rgba(255, 150, 150, 255),
    3px 3px 0 rgba(255, 125, 125, 255);
  color: #fff;
}

#timerBox p {
  margin: 1rem 0;
  font-size: 1.5rem;
  font-family: Tahoma, sans-serif;
  text-align: center;
  color: grey;
}

#clockdiv {
  font-family: sans-serif;
  color: #fff;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  font-weight: 100;
  text-align: center;
  font-size: 30px;
}

#clockdiv > div {
  padding: 10px;
  border-radius: 3px;
  background: #616161;
  display: inline-block;
}

#clockdiv div > span {
  padding: 15px;
  border-radius: 3px;
  background: #4e4e4e;
  display: inline-block;
}

.smalltext {
  padding-top: 5px;
  font-size: 16px;
}
