/*
    Colors: https://www.happyhues.co/palettes/17
*/

body {
    background-color: #f3d2c1;
    color: #001858;
    font-family: Maplestory, 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    justify-content: center;
    align-items: center;
    margin: 0;
    font-size: 1.3em;
}

/*
    Korean font
*/

@font-face {
    font-family: Maplestory;
    src: url('/assets/fonts/Maplestory.otf');
    font-display: swap;
}

/*
    Header
*/

header {
    text-align: center;
    margin-top: 2%;
    font-size: 1.5em;
    position: relative;
}

h1 {
    vertical-align: center;
}

.palette {
    font-size: 4em;
}

.color-to-guess {
    height: 30vh;
    margin: auto;  
    margin-top: 1%;
    opacity: 0;
}

.btn-start {
    height: 80px;
    line-height: 80px;
    width: 300px;
    text-align: center;
    cursor: pointer;
    background-color: #fef6e4;
    border: 3px solid #001858;
    color: black;
    border-radius: 5px;
    margin: auto;
    margin-top: 100px;
    font-size: 1.8em;
    transition: all .3s;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.btn-start:hover {
    background-color: lightblue;
}

/*
    Choices
*/

.choices {
    position: absolute;
    width: 95%;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 0);
    display: flex;
    margin: auto;
    padding: 20px;
    justify-content: center;
    align-items: center;
    transition: all .3s;
    opacity: 0;
}

.choice {
    margin: 20px;
    height: 100px;
    line-height: 100px;
    width: 300px;
    background-color: #fef6e4;
    border: 3px solid #001858;
    text-align: center;
    font-size: 1.5em;
    transition: all .3s;
    cursor: pointer;
    border-radius: 5px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.choice:hover {
    transform: scale(1.05);
    background-color: lightblue;
}

.flip {
    transform: rotateX(180deg);
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    50% { transform: rotate(0eg); }
    75% { transform: rotate(-3deg); }
    100% { transform: rotate(0deg); }
}

.wrong-answer {
    animation: .2s shake 0s 3;
    border-color: red;
    color: red;
}

.right-answer {
    transition: transform 5s;
    transform: scale(1.2);
    border-color: green;
    color: green;
}

@keyframes splat {
    0% {
        opacity: 0.5;
        transform: scale(1.1);
    }
    20% {
        opacity: 0;
        transform: scale(1.2);
    }
    70% {
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.active {
    /* animation: 1s splat; */
    transition: all 3s;
    opacity: 0;
    transform: scale(1.2);
}

/*
    Color list
*/

.btn-show-colors {
    background-color: #fef6e4;
    border: 3px solid #001858;
    color: black;
    border-radius: 5px;
    position: absolute;
    top: 0;
    right: 0;
    margin: 20px;
    padding: 6px 12px;
    font-size: 1.3em;
    cursor: pointer;
    width: 30px;
    text-align: center;
    user-select: none;
    transition: all .3s;
    font-size: 1em;
}

.btn-show-colors:hover {
    background-color: lightblue;
}

.color-list {
    position: absolute;
    visibility: hidden;
    margin: 20px;
    top: 50px;
    padding: 6px 12px;
    width: 150px;
    right: 0;
    font-size: 1.2em;
    border-radius: 5px;
    border: 3px solid #001858;
    background-color: #fef6e4;
}

.color-line {
    display: flex;
    align-items: center;
    margin: 5px 0;
    position: relative;
}

.square {
    width: 15px;
    height: 15px;
    border-radius: 5px;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid #001858;
}
