@import url('https://fonts.googleapis.com/css?family=Raleway:200');
*{
    margin: 0;
    padding: 0;
}

html, body{
    height: 100%;
    overflow: hidden;
}



#container{
    position:absolute;
    top:150px;
    left:50%;
    margin-left: -200px;
    -webkit-perspective:800;
    -moz-perspective:800;
    -o-perspective:800;
    -ms-perspective:800;
    perspective:800;
}

#card{
  border-radius: 5px;
    width: 400px;
    height: 280px;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -o-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.header{
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility:hidden;
    -moz-backface-visibility:hidden;
    -o-backface-visibility:hidden;
    -ms-backface-visibility:hidden;
    backface-visibility:hidden;
}

.header h1{
    cursor: pointer;
    color: hsla(0,0%,20%,1);
    text-shadow: 0px 1px 1px hsla(0,0%,100%,1);
    font-family: 'Bad Script', cursive;
    font-size: 1em;
    text-align: center;
    margin-top: 110px;
}

.heading{
    background: -webkit-linear-gradient(top, hsla(54,4%,85%,1) 0%,hsla(54,0%,96%,1) 50%,hsla(54,4%,80%,1) 100%);
    z-index: 20;
}

.section{
    background: -webkit-linear-gradient(top, hsla(54,0%,96%,1) 0%, hsla(54,0%,56%,1) 100%);
    -webkit-transform:rotateY(-180deg);
    -moz-transform:rotateY(-180deg);
    -o-transform:rotateY(-180deg);
    -ms-transform:rotateY(-180deg);
    transform:rotateY(-180deg);
}

#close{
    position: absolute;
    top:0;
    left:0;
    height: 0;
    width: 80px;
    border-top: 175px solid hsla(0,0%,85%,1);
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
    -webkit-transform-origin:center top;
    -moz-transform-origin:center top;
    -o-transform-origin:center top;
    -ms-transform-origin:center top;
    transform-origin:center top;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -o-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transform-style: preserve-3d;
    z-index: 10;
}

#cross{
    position: absolute;
    top:0px;
    left:0px;
    width: 0;
    height: 0;
    border-left: 200px solid hsla(0,0%,90%,1);
    border-top: 140px solid transparent;
    border-bottom: 140px solid transparent;
    z-index: 5;
}

#cross:after{
    content: "";
    position: absolute;
    bottom:-140px;
    left:-200px;
    height: 0;
    width: 80px;
    border-bottom: 175px solid hsla(0,0%,95%,1);
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
}

#cross:before{
    content: "";
    position: absolute;
    top:-140px;
    right:-200px;
    width: 0;
    height: 0;
    border-right: 200px solid hsla(0,0%,90%,1);
    border-top: 140px solid transparent;
    border-bottom: 140px solid transparent;
}

#greeting{
    background: rgb(162,123,204);
  background: -moz-radial-gradient(center, ellipse cover,  rgba(162,123,204,1) 0%, rgba(108,82,153,1) 100%);
  background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(162,123,204,1)), color-stop(100%,rgba(108,82,153,1)));
  background: -webkit-radial-gradient(center, ellipse cover,  rgba(162,123,204,1) 0%,rgba(108,82,153,1) 100%);
  background: -o-radial-gradient(center, ellipse cover,  rgba(162,123,204,1) 0%,rgba(108,82,153,1) 100%);
  background: -ms-radial-gradient(center, ellipse cover,  rgba(162,123,204,1) 0%,rgba(108,82,153,1) 100%);
  background: radial-gradient(ellipse at center,  rgba(162,123,204,1) 0%,rgba(108,82,153,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a27bcc', endColorstr='#6c5299',GradientType=1 );
    box-shadow: 0px 2px 5px hsla(0,0%,10%,1);
    border-radius: 5px;
    position: absolute;
    top:3px;
    left:0;
    margin: 0 0 0 5px;
    width: 390px;
    height: 260px;
    overflow: hidden;
    z-index: 1;
}

#greeting p:first-of-type{
    color: hsla(0,0%,20%,1);
    text-shadow: 0px 1px 1px hsla(0,0%,100%,1);
    text-align: center;
    font-size: 20px;
    margin-top: 40px;

}
#greeting p{
  color: #f5f5f5;
  font-weight:bold;
  font-size: 20px;
}


.icon-cancel{
    cursor: pointer;
    color: hsla(0,0%,70%,1);
    font-size: 0.8em;
    float: right;
    text-align: center;
    text-shadow: 0px 1px 1px hsla(0,0%,100%,1);
    margin: 5px;
}

.icon-cancel:hover, .header h1:hover{
    color: hsla(0,84%,33%,1);
}

svg{
    margin: 30px 0 10px 180px;
}



.rotate,
.flip,
.rotate_,
.flip_,
.open,
.opencover{
  -webkit-transition: all 1s;
  -moz-transition: all 1s;
  -o-transition: all 1s;
  -ms-transition: all 1s;
  transition: all 1s;
}

.open_,
.opencover_{
  -webkit-transition: all 0.8s;
  -moz-transition: all 0.8s;
  -o-transition: all 0.8s;
  -ms-transition: all 0.8s;
  transition: all 0.8s;
}

.rotate_,
.open,
.opencover{
  -webkit-transition-delay: 1s;
  -moz-transition-delay: 1s;
  -o-transition-delay: 1s;
  -ms-transition-delay: 1s;
  transition-delay: 1s;
}

.flip,
.flip_{
  -webkit-transition-delay: 0.5s;
  -moz-transition-delay: 0.5s;
  -o-transition-delay: 0.5s;
  -ms-transition-delay: 0.5s;
  transition-delay: 0.5s;
}

.rotate{
  -webkit-transform: rotate3d(0,1,0,180deg);
  -moz-transform: rotate3d(0,1,0,180deg);
  -o-transform: rotate3d(0,1,0,180deg);
  -ms-transform: rotate3d(0,1,0,180deg);
  transform: rotate3d(0,1,0,180deg);
}

.flip{
  -webkit-transform: rotate3d(1,0,0,180deg);
  -moz-transform: rotate3d(1,0,0,180deg);
  -o-transform: rotate3d(1,0,0,180deg);
  -ms-transform: rotate3d(1,0,0,180deg);
  transform: rotate3d(1,0,0,180deg);
    z-index: 0 !important;
}

.rotate_{
  -webkit-transform: rotate3d(0,1,0,0deg);
  -moz-transform: rotate3d(0,1,0,0deg);
  -o-transform: rotate3d(0,1,0,0deg);
  -ms-transform: rotate3d(0,1,0,0deg);
  transform: rotate3d(0,1,0,0deg);
}

.flip_{
  -webkit-transform: rotate3d(1,0,0,0deg);
  -moz-transform: rotate3d(1,0,0,0deg);
  -o-transform: rotate3d(1,0,0,0deg);
  -ms-transform: rotate3d(1,0,0,0deg);
  transform: rotate3d(1,0,0,0deg);
    z-index: 10 !important;
}

.open{
  -webkit-transform: translateY(-600px);
  -moz-transform: translateY(-600px);
  -o-transform: translateY(-600px);
  -ms-transform: translateY(-600px);
  transform: translateY(-600px);
}

.opencover{
  -webkit-transform: translateY(500px);
  -moz-transform: translateY(500px);
  -o-transform: translateY(500px);
  -ms-transform: translateY(500px);
  transform: translateY(500px);
}

.open_,
.opencover_{
  -webkit-transform: translateY(0px);
  -moz-transform: translateY(0px);
  -o-transform: translateY(0px);
  -ms-transform: translateY(0px);
  transform: translateY(0px);
}

.cake {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -50px;
  margin-top: -50px;
  width: 100px;
  height: 100px;
}

.cake:after {
  background: #ebe3e1;
  border-radius: 100px;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 2px;
}

.base {
  background: #ffffff;
  border-radius: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -2.5px;
  margin-top: -8.333333333333334px;
  width: 5px;
  height: 16.666666666666668px;
}
.base:after,
.base:before {
  background: rgba(255, 0, 0, 0.4);
  content: "";
  position: absolute;
  width: 100%;
  height: 2.2222222222222223px;
}
.base:after {
  top: 25%;
  left: 0;
}
.base:before {
  top: 45%;
  left: 0;
}

.layer {
  border-radius: 100%;
  box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
  position: absolute;
  top: -12px;
  left: 50%;
  margin-left: -3.3333333333333335px;
  width: 6.666666666666667px;
  height: 12.5px;
}
.layer:nth-child(1) {
  animation: layer 2s infinite;
}
.layer:nth-child(2) {
  animation: layer 1.5s infinite;
}
.layer:nth-child(3) {
  animation: layer 1s infinite;
}
.layer:nth-child(4) {
  animation: layer 0.5s infinite;
}
.layer:nth-child(5) {
  animation: layer 0.2s infinite;
}

@keyframes layer {
  0% {
    background: rgba(254, 248, 97, 0.5);
    transform: translateY(0) scale(1);
  }
  50% {
    background: rgba(255, 50, 0, 0.1);
    transform: translateY(-20px) scale(0);
  }
  100% {
    background: rgba(254, 248, 97, 0.5);
    transform: translateY(0) scale(1);
  }
}

.choc {
  background: #ece7e3;
  border-radius: 50px;
  position: absolute;
  top: 60%;
  left: 50%;
  margin-left: -27.77777777777778px;
  margin-top: -5px;
  width: 55.55555555555556px;
  height: 12.5px;
  z-index: 10;
}
.choc:after,
.choc:before {
  background: #ece7e3;
  border-radius: 100px;
  content: "";
  position: absolute;
  width: 5px;
  height: 10px;
}
.choc:after {
  top: 6.666666666666667px;
  right: 14.285714285714286px;
}
.choc:before {
  top: 10px;
  right: 9.090909090909092px;
}

.light {
  background: #6d3826;
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -25px;
  width: 50px;
  height: 33.333333333333336px;
}
.light:after,
.light:before {
  background: rgba(236, 231, 227, 0.6);
  content: "";
  position: absolute;
  width: 100%;
  height: 5px;
}
.light:after {
  top: 30%;
  left: 0;
}
.light:before {
  top: 60%;
  left: 0;
}

/* @import url('https://fonts.googleapis.com/css?family=Raleway:200'); */

body {
  font-family: 'Raleway', sans-serif;
  background-color: #F0E2DB;
  font-size: 20px;
  transition: 1s;
}

body.open {
  animation: bg-change 1s 1;
  background-color: #FFC0CB;
  transition: 1s;
}

@keyframes bg-change {
  0% {
    background-color: #F0E2DB;
  }
  100% {
    background-color: #FFC0CB;
  }
}

.gift {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  transform-origin: 0% 0%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: 1s;
}

.dukdik {
  transform-origin: 0% 0%;
  cursor: pointer;
  animation: dukdik 0.5s infinite;
}

@keyframes dukdik {
  0% {
    transform: rotate(0deg) translate(-50%, -50%);
  }
  25% {
    transform: rotate(1deg) translate(-50%, -50%);
  }
  50% {
    transform: rotate(0deg) translate(-50%, -50%);
  }
  70% {
    transform: rotate(-1deg) translate(-50%, -50%);
  }
  100% {
    transform: rotate(0deg) translate(-50%, -50%);
  }
}

.gift-top {
  position: relative;
  width: 110%;
  height: 25%;
  background: #F54537;
  border-radius: 5px 5px 0 0;
  transform: translate3d(-5%, 0, 0);
  background-image: linear-gradient(to right, #F54537 0%, #F54537 44%, #FFC113 44%, #FFC113 56%, #F54537 56%, #F54537 100%);
  transition: 1s;
}

.gift-top.boxOpen {
  animation: box-open 1s;
  opacity: 0;
}

@keyframes box-open {
  0% {
    top: 0px;
    opacity: 1;
  }
  100% {
    top: -50px;
    opacity: 0;
  }
}

.gift-top::before,
.gift-top::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 10px solid #FFC113;
  border-radius: 50% 50% 0 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate3d(-100%, -100%, 0) skew(10deg, 10deg);
}

.gift-top::after {
  border-radius: 50% 50% 50% 0;
  transform: translate3d(0, -100%, 0) skew(-10deg, -10deg);
}

.gift-box {
  width: 100%;
  height: 75%;
  position: relative;
  background-image: linear-gradient(to right, #D43130 0%, #D43130 45%, #FF900A 45%, #FF900A 55%, #D43130 55%, #D43130 100%);
  border-radius: 0 0 5px 5px;
  transition: 1s;
}

.gift-box.boxDown {
  animation: box-down 1s;
  opacity: 0;
}

@keyframes box-down {
  0% {
    top: 0px;
    opacity: 1;
  }
  100% {
    top: 50px;
    opacity: 0;
  }
}

.anniversary-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #FFFFFF;
  font-size: 3em;
  font-weight: bold;
  text-align: center;
}

