* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.container {
    display: flex;
    flex-flow: column wrap;
    align-items: center;
    width: 25%;
    height: 60%;
}
header {
    position: relative;
    font-size: 40px;
    color: #000;
}
.add-card {
    position: absolute;
    top: 50%;
    right: 0;
    width: 100px;
    height: 30px;
    border: 1px solid #aaa;
    border-radius:4px;
    background: #fff;
    color: #000;
    transform: translate(120%, -50%);
    cursor: pointer;
}
footer {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    width: 40%;
}

footer > span {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
}
.cards {
    perspective: 1000px;
    position: relative;
    margin-top: 30px;
    width: 500px;
    height: 300px;
    transform-style: preserve-3d;
}
.card {
    position: relative;
    opacity: 0;
    transform-style: preserve-3d;
    transition: .6s ease;
    transform: translateX(50%) 
}
.active {
    opacity: 1;
    transform: translateX(0) 
}
.left {
    transform: translateX(-50%) rotateY(10deg);
}
.card-front,
.card-back {
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 500px;
    height: 300px;
    border: 1px solid #aaa;
    box-shadow: 0 0 5px #aaa;
}
.card-front {
    z-index: 2;
}
.card-back {
    transform: rotateY(180deg);
}
.cards:hover .card {
    transform: rotateY(-180deg) ;
}

.left{
    transform: translateX(-50%) rotateY(10deg);
}
.add-card-div {
    position: absolute;
    top: 100px;
    left: 50%;
    display: flex;
    flex-flow: column wrap;
    width: 650px;
    height: 480px;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-shadow: 0 0 10px #aaa;
    visibility: hidden;
    opacity: 0;
    background: #fff;
    transform: translateX(-50%);
    transition: .5s;
    z-index: 999;
}
.show-add-card-div {
    top: 200px;
    opacity: 1;
    visibility: visible;
    z-index: 999;
}
.add-card-div-header {
    align-self: flex-end;
    margin: 25px 25px 0 0;
    cursor: pointer;
}
.add-card-div-question,
.add-card-div-answer {
    display: flex;
    flex-flow: column wrap;
    margin: 20px 30px 0 30px;
}
.add-card-div h2 {
    align-self: center;
    margin-top: 15px;
}
.add-card-div textarea {
    margin-top: 10px;
    padding: 10px;
}
.confirm-btn {
    align-self: center;
    margin-top: 20px;
    width: 200px;
    height: 40px;
    background: #fff;
    color: #000;
    border: 1px solid #aaa;
    border-radius: 4px;
    cursor: pointer;
}
