@charset "utf-8";

/*--------------------------------------------*/
/*Utility classes                             */
/*--------------------------------------------*/

.container {
    width: min(100% - 30px, 1200px);
    margin-inline: auto;
}

.grid {
    display: grid;
    place-items: center;
}

.flex {
    display: flex;
}

.space {
    justify-content: space-between;
}

/*--------------------------------------------*/
/*Background                                  */
/*--------------------------------------------*/

body {
    background: #171921;
    font-family: "Jersey 25", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: -1; 
}

/*--------------------------------------------*/
/*Main                                        */
/*--------------------------------------------*/

.game-area {
    width: 500px;
    height: 380px;
    border-radius: 10px;
    position: relative;
    background: #fff url(../img/bg-modal.jpg) center center / cover no-repeat;
}

.content {
    font-size: 24px;
}

.top {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    h2 {
        padding-left: 25px;
        font-size: 30px;
        color:#6e171d;
    }
    
    .game-btn {
        margin-right: 25px;
        width: 80px;
        height: 40px;
        border-radius: 10px;
        background-color: #10c97c;
        font-size: 18px;
        color:#6e171d;
        font-weight: 600;
    }

    .game-btn:hover {
        background-color: #0ba766;   
        transition: ease-in-out 0.25s;
    }
}

.time {
    width: 100%;
    height: 80px;
    align-items: center;
    justify-content: center;
    gap:30px;
    
    .timer {
        font-size: 70px;
        color:#10c97c;
        text-align: center;
        line-height: 45px;
    }
}

.screen {
    width: calc(100% - 50px);
    height: 80px;
    border-radius: 10px;
    background-color: #2a3d2d;
    cursor: not-allowed;

    h1 {
        font-size: 55px;
        line-height: 80px;
        text-align: center;
        color: #fff;
    }
}

.hit {
    width: 100%;
    height: 50px;

    h2 {
        font-size: 20px;
        line-height: 50px;
        text-align: center;
        color:#6e171d;
    }
}

.input {
    width: calc(100% - 50px);
    height: 50px;
    border-radius: 10px;
    background-color: #fff;
    border: 2px solid #fff;
    font-size: 20px;
    color:#000;
    text-align: center;
    cursor: not-allowed;
}

.input:focus {
    border: 2px solid #2a3d2d;
}

.input::placeholder {
    color: #6e171d;
}

.playing::placeholder {
    color: #757575;
}

.copy-right {
    width: 100%;
    height: 50px;
    font-size: 15px;

    p {
        line-height: 50px;
        text-align: center;
        color:#757575;
    }
}

/*--------------------------------------------*/
/*Modal                                       */
/*--------------------------------------------*/

.modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);  
    justify-content:center;
    align-items:center;
    z-index: 2;
}

.modal-content {
    background: #fff url(../img/bg-modal.jpg) center center / cover no-repeat;
    width: 500px;
    height: 380px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    position:relative;

    h2 {
        position:absolute;
        inset: 0 auto auto auto;
        color: #6e171d;
        font-size: 50px;
    }

    p {
        font-size: 50px;
        color: #2a3d2d;
        font-weight: 800;
    }

    .user-image {
        position:absolute;
        inset: auto auto 20px auto;
        width:80px;
        height:80px;
    }
}

.score-record {
    position:absolute;
    inset: 110px auto auto auto;
}

.score-item {
    width: 350px;
    height: 50px;
    display:flex;
    justify-content: space-between;
}

/*--------------------------------------------*/
/*Dialog                                      */
/*--------------------------------------------*/

dialog {
    position: fixed;
    inset: 0 50px auto auto;
    z-index: 2;
    background: #fff url(../img/bg-modal.jpg) center center / cover no-repeat;
    width: 300px;
    height: 500px;
    border-radius: 10px;
    outline: none;
    border: none;
    padding: 20px;
    animation: 1s linear anim;

    h2 {
        color: #6e171d;
        font-size: 30px;
        text-align: center;
    }

    p {
        text-align: center;
    }
}

@keyframes anim {
    from {
        opacity: 0;
        translate: 0 -500px;
    } to {
        opacity: 1;
        translate: 0 0;
    }
}

.high-scores {
    margin-top: 15px;
}

.top-item {
    
    width: 260px;
    height: 40px;
    display:flex;
    justify-content: space-between;
}

/*--------------------------------------------*/
/*Media screen                                */
/*--------------------------------------------*/

@media screen and (max-width: 768px) {
    .game-area {
        width: 350px;
    }

    .screen h1 {
        font-size: 30px;
    }

    .modal {
        display: none;
    }
}