/* 

Full-Page View:

https://codepen.io/GeorgePark/full/WgGmPq/

*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

input {
    background-color: #fff;
}

button {
    background-color: #c066ff;
    color: #341238;
}

body {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    min-height: 100vh;
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    color: #fff;
    padding: 20px;
    overflow-x: hidden;
    background-image: linear-gradient(to bottom right, #92fe9d 0%, #00c9ff 100%);
}

.card {
    padding: 25px;
    border-radius: 20px;
    border: 3px solid #5b2361;
    background-color: #c066ff;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23df8eff' fill-opacity='0.7' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    background-size: cover;
}

.emoji-container {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    border-radius: 20px;
    border: 3px solid #5b2361;
    overflow: hidden;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a3a3a3' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
}

h1,
h2 {
    line-height: 1.2;
    -webkit-text-stroke-width: 2px;
    -webkit-text-stroke-color: #341238;
}

h1 span,
h2 span {
    -webkit-text-stroke-width: 0;
}

h1 {
    font-size: 40px;
    margin: 25px 0;
}

h2 {
    font-size: 28px;
    margin-bottom: 40px;
}

.emoji-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 130px;
    height: 130px;
    font-size: 70px;
    border: none;
    padding: 0;
    background: none;
    outline: none;
    overflow: hidden;
    user-select: none;
    cursor: pointer;
    transition: transform 1s, background-color 2s;
}

@media screen and (max-width: 486px) {
    .emoji-btn {
        width: 50px;
        height: 50px;
        font-size: 35px;
    }
}


.emoji-btn::after {
    content: '💰';
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    transition: transform 800ms;
}

.emoji-btn span {
    border-radius: 50%;
    transform: scale(0);
    transition: transform 800ms cubic-bezier(0.22, 0.64, 0.69, 1.3), background-color 3s, box-shadow 1.5s;
}

.uncovered::after {
    transform: rotate(-600deg) scale(0);
}

.uncovered span {
    transform: scale(1);
}

.winning-emoji span {
    background-color: rgba(255, 217, 0, 0.85);
    box-shadow: 0 0 10px 8px rgba(255, 217, 0, 0.85);
}

.dialog-box {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -100px;
    left: 50%;
    width: 500px;
    height: 150px;
    font-weight: 600;
    border-radius: 25px;
    border: 3px solid #5b2361;
    background-image: linear-gradient(to right, #b465da, #cf6cc9 33%, #ee609c 66%, #ee609c);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    transform: translate(-50%, -50%);
}

.show-dialog {
    display: flex;
    animation: showDialog 1s 2s forwards cubic-bezier(0.17, 0.67, 0.63, 1.3);
}

.dialog-message {
    font-size: 35px;
    margin-bottom: 0;
}

.dollar-bill {
    position: absolute;
    bottom: 100%;
    font-size: 50px;
    user-select: none;
    animation: rainMoney 3s linear forwards;
}

.dollar-bill:nth-child(2n) {
    animation-delay: 100ms;
}

.dollar-bill:nth-child(3n) {
    animation-delay: 400ms;
}

.dollar-bill:nth-child(4n) {
    animation-delay: 800ms;
}

.dollar-bill:nth-child(5n) {
    animation-delay: 1.2s;
}

@keyframes showDialog {
    100% {
        top: 50%;
    }
}

@keyframes rainMoney {
    90% {
        opacity: 1;
    }
    
    100% {
        opacity: 0;
        bottom: 15px;
        transform: rotate(360deg);
    }
}
