/* ================================================= */
/* RESET */
/* ================================================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    font-family:Arial, Helvetica, sans-serif;

    background-image:url("../images/background.jpg");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    background-attachment:fixed;

    color:white;

    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    user-select:none;
    -webkit-user-select:none;
}

*{
    -webkit-tap-highlight-color:transparent;
}

/* ================================================= */
/* SCREENS */
/* ================================================= */

.screen{

    width:100%;

    min-height:100vh;

    display:flex;

    justify-content:center;

    align-items:center;
}

.hidden{

    display:none;
}

/* ================================================= */
/* PANEL */
/* ================================================= */

.panel{

    width:90%;

    max-width:900px;

    min-height:650px;

    background:#207042;

    border-radius:25px;

    padding:60px;

    text-align:center;

    box-shadow:0 0 25px rgba(0,0,0,.35);
}

/* ================================================= */
/* TEXT */
/* ================================================= */

.panel h1{

    font-size:100px;

    margin-bottom:100px;
}

.panel h2{

    font-size:42px;

    margin:25px 0;

    color:#fff;
}

.panel p{

    font-size:24px;

    font-weight:bold;

    color:#f8f3b0;

    line-height:1.6;

    margin:20px 0;
}

/* ================================================= */
/* LOGO */
/* ================================================= */

.gameLogo{

    font-weight:900;

    color:#f5f4f1;

    -webkit-text-stroke:2px black;

    text-shadow:3px 3px 8px rgba(0,0,0,.35);
}

/* ================================================= */
/* FORMS */
/* ================================================= */

form{

    margin-top:30px;
}

input{

    width:220px;

    padding:12px;

    margin-right:10px;

    border:none;

    border-radius:10px;

    font-size:20px;

    text-align:center;
}

button{

    padding:12px 28px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    font-size:18px;

    transition:.25s;
}

button:hover{

    transform:scale(1.05);
}

/* ================================================= */
/* GAME HEADER */
/* ================================================= */

.top-bar{

    position:relative;

    width:100%;

    margin-bottom:80px;
}

.logo-small{

    position:absolute;

    left:0;

    top:0;

    font-size:42px;

    font-weight:bold;
}

/* ================================================= */
/* GAME */
/* ================================================= */

#computerGuess{

    font-size:100px;

    margin:30px 0;

    color:#fff;
}

.answer-buttons{

    display:flex;

    justify-content:center;

    gap:20px;

    margin-top:40px;
}

.answer-buttons button{

    min-width:90px;

    min-height:70px;

    font-size:28px;
}

#correctBtn{

    min-width:150px;
}

/* ================================================= */
/* ANIMATIONS */
/* ================================================= */

.center-message{

    position:fixed;

    top:50%;

    left:50%;

    transform:translate(-50%,-50%) scale(.2);

    opacity:0;

    pointer-events:none;

    font-size:90px;

    font-weight:bold;

    color:#febe00;

    transition:all .8s ease;
}

.center-message.show{

    opacity:1;

    transform:translate(-50%,-50%) scale(1.4);
}

/* ================================================= */
/* WIN SCREEN */
/* ================================================= */

#winnerEmoji{

    font-size:100px;

    margin-bottom:20px;
}

#winnerMessage{

    font-size:40px;

    margin-bottom:30px;
}

#playAgain{

    width:220px;

    margin-top:40px;
}
/* ================================================= */
/* DIFFICULTY */
/* ================================================= */

.difficulty{

    display:flex;

    justify-content:center;

    gap:20px;

    margin-top:20px;
}

.difficulty button{

    width:120px;
}

.selected{

    background:#1c8541;

    color:white;
}

#easyBtn.selected,
#hardBtn.selected{

    border:4px solid black;
}

/* ================================================= */
/* SCORE BOARDS */
/* ================================================= */

#scoreBoard,
#scoreBoard2{

    text-align:center;

    font-size:46px;

    font-weight:bold;

    color:#febe00;

    margin-top:40px;

    margin-bottom:90px;
}

#turn{

    margin-top:80px;
}

/* ================================================= */
/* GUESS FORM */
/* ================================================= */

#guessForm{

    margin-top:45px;
}

/* ================================================= */
/* GOLD BUTTONS */
/* ================================================= */

#guessForm button,
#playAgain,
#playAgainCheat,
#easyBtn,
#hardBtn,
#startForm button,
#higherBtn,
#lowerBtn,
#correctBtn{

    background:#febe00;

    color:#222;

    font-weight:bold;
}

#guessForm button:hover,
#playAgain:hover,
#playAgainCheat:hover,
#easyBtn:hover,
#hardBtn:hover,
#startForm button:hover,
#higherBtn:hover,
#lowerBtn:hover,
#correctBtn:hover{

    background:#febe00;
}
/* ================================================= */
/* CHEAT SCREEN */
/* ================================================= */

.cheat-container{

    position:relative;

    display:inline-block;
    overflow:visible;
}

#screen5 .panel{

    position:relative;
    background:transparent;
    box-shadow:none;
    border-radius:0;
    padding:0;
    min-height:auto;
}

#screen5 .cheat-container{

    position:relative;
    display:block;
    width:fit-content;
    margin:0 auto;
    overflow:visible;
}

#screen5 #statisticsBtn,
#screen5 #settingsBtn{

    position:absolute;
    top:20px;
    z-index:120;
}

#screen5 #statisticsBtn{

    right:20px;
}

#screen5 #settingsBtn{

    right:20px;
    top:76px;
}

#screen5 #settingsMenu{

    position:absolute;
    top:126px;
    right:20px;
    z-index:130;
}

#screen5 .statistics-panel{

    position:absolute;
    top:20px;
    right:calc(50% - min(1000px, 95vw) / 2 + 20px);
    width:56px;
    height:56px;
    padding:0;
    border-radius:50%;
    overflow:hidden;
    opacity:0;
    visibility:hidden;
    transform:scale(0);
    transform-origin:top right;
    transition:
        transform .35s ease,
        opacity .35s ease,
        width .35s ease,
        height .35s ease,
        border-radius .35s ease,
        padding .35s ease,
        top .35s ease,
        right .35s ease,
        left .35s ease;
    z-index:110;
    inset:auto;
    background:#0b3d2e;
}

#screen5 .statistics-panel.show{

    top:0;
    left:50%;
    right:auto;
    transform:translateX(-50%) scale(1);
    width:min(1000px, 95vw);
    height:auto;
    aspect-ratio:16 / 9;
    padding:30px 40px;
    border-radius:20px;
    opacity:1;
    visibility:visible;
    overflow-y:auto;
    overflow-x:hidden;
}

#cheatVideo{

    width:1000px;

    max-width:95vw;

    height:auto;

    display:block;

    border-radius:20px;

    object-fit:cover;

    pointer-events:none;
}

#playAgainCheat{

    position:absolute;

    left:65%;

    bottom:150px;

    transform:translateX(-50%);

    padding:14px 35px;

    font-size:24px;

    font-weight:bold;

    border-radius:12px;

    cursor:pointer;
}
/* ================================================= */
/* MOBILE */
/* ================================================= */

@media (max-width:700px){

    .screen{

        min-height:100vh;

        padding:20px 0;

    }

    .statistics-panel,
    .help-panel{

        padding:24px 18px;

        gap:12px;

    }

    .statistics-panel h2,
    .help-panel h2{

        font-size:32px;

        margin-bottom:10px;

    }

    .stat-row{

        width:100%;

        font-size:20px;

        padding:8px 0;

    }

    .stat-row span:last-child{

        font-size:20px;

    }

    .help-panel p,
    .help-panel .help-step{

        width:100%;

        font-size:18px;

    }

    .panel{

        width:95%;

        min-height:auto;

        padding:20px;

        margin:20px 0;

    }

    /* ---------- Screen 1 ---------- */

    #screen1 .gameLogo{

        font-size:48px;

        white-space:nowrap;

        margin-bottom:20px;

    }

    #screen1 p{

        font-size:20px;

        line-height:1.4;

        margin:8px 0;

    }

    #screen1 #startForm{

        margin-top:15px;

    }

    /* ---------- Inputs ---------- */

    input{

        width:100%;

        margin:0 0 15px 0;

    }

    button{

        width:100%;

    }


    .difficulty{

        flex-direction:column;

        gap:15px;

    }

    .difficulty button{

        width:100%;

    }

.corner-btn{

    width:20px !important;
    height:20px !important;

    min-width:20px !important;
    min-height:20px !important;

    font-size:10px !important;

    padding:0 !important;

    border-radius:4px !important;

}
#settingsBtn{

    top:42px !important;

}




    /* ---------- Screen 2 ---------- */

    .top-bar{

        margin-bottom:25px;

    }

    .logo-small{

        position:static;

        text-align:center;

        font-size:28px;

    }

    #scoreBoard,
    #scoreBoard2{

        font-size:28px;

        margin-top:20px;

        margin-bottom:35px;

    }

    #turn{

        margin-top:20px;

    }

    #computerGuess{

        font-size:70px;

    }

    .answer-buttons{

        flex-wrap:wrap;

        gap:15px;

        margin-top:25px;

    }

    #screen2 .answer-buttons button{

        min-width:100%;

        min-height:60px;

        font-size:24px;

    }

    #correctBtn{

        min-width:100%;

    }

    /* ---------- Messages ---------- */

    .center-message{

        font-size:45px;

    }

    /* ---------- Cheat Screen ---------- */

    #cheatVideo{

        width:95vw;

    }

    #playAgainCheat{

    position:absolute;

    left:74%;

    bottom:50px;

    transform:translateX(-50%);

    width:120px;

    font-size:20px;


    

}
    #screen3 .panel{

    min-height:auto;

    padding:20px;

    margin:20px 0;

    }
     #screen3 #scoreBoard2{

     margin-top:15px;

     margin-bottom:25px;

     font-size:28px;

}

        #screen3 h2{

     margin:10px 0;

     font-size:28px;

    }

    #screen3 p{

     margin:8px 0;

     font-size:20px;

}

     #screen3 #computerGuess{

     font-size:70px;

     margin:15px 0;

    }
     #screen3 .answer-buttons{

     display:grid;

     grid-template-columns:1fr 1fr;

     gap:15px;

     margin-top:20px;

     }

     #higherBtn,
     #lowerBtn{

     width:100%;

     }

     #correctBtn{

     grid-column:1 / 3;

     width:100%;

     }
      #screen3{

    align-items:center;

        }

       #screen3 .panel{

       max-height:90vh;

      overflow:hidden;

        }

}
/* ================================================ */
/* STATISTICS BUTTON */
/* ================================================ */

.corner-btn{

    position:absolute;

    top:20px;
    z-index: 200;
    width:44px;
    height:44px;

    border:none;
    border-radius:10px;

    font-size:24px;
    line-height:1;
    cursor:pointer;

    background:transparent;
    color:#fff;

    display:flex;
    justify-content:center;
    align-items:center;

    transition:transform .25s ease, color .25s ease;
}

#helpBtn{

    left:20px;
    background:#febe00;
    color:#222;
}

#statisticsBtn{

    right:20px;
    background:#0b3d2e;
    color:#fff;
}

#settingsBtn{

    right:20px;
    top:76px;
    background:#0b3d2e;
    color:#fff;
}

.corner-btn:hover{

    transform:scale(1.1);
}

.panel{

    position:relative;
}

#settingsMenu{

    position:absolute;
    top:126px;
    right:20px;
    width:140px;
    background:#0b3d2e;
    border-radius:10px;
    box-shadow:0 6px 20px rgba(0,0,0,.25);
    padding:6px 0;
    display:flex;
    flex-direction:column;
    gap:6px;
    z-index:110;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}

#settingsMenu.show{

    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

.settings-item{

    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 12px;
    color:#fff;
    font-size:14px;
    cursor:pointer;
}

.settings-item:hover{

    background:rgba(255,255,255,.08);
}

.settings-separator{

    height:1px;
    margin:2px 8px;
    background:rgba(255,255,255,.25);
}

.settings-reset{

    margin-top:2px;
}
.statistics-panel,
.help-panel{

    display:flex;

    flex-direction:column;
    padding-top:70px;
    padding-bottom:30px;
    justify-content:flex-start;

    align-items:center;

    position:absolute;

    inset:0;

    background:#0b3d2e;

    border-radius:20px;

   padding:70px 40px 30px 40px;

    opacity:0;

    visibility:hidden;

    transform:scale(0);

    transition:
        transform .35s ease,
        opacity .35s ease;

    gap:18px;

    z-index:500;
}

.statistics-panel{

    transform-origin:top right;

    overflow-y:auto;
    overflow-x:hidden;

}
.help-panel{

    background:#febe00;
    transform-origin:top left;

    height:100%;
    overflow-y:auto;
    overflow-x:hidden;

}
.statistics-panel.show,
.help-panel.show{

    opacity:1;

    visibility:visible;

    transform:scale(1);

}

.statistics-panel h2,
.help-panel h2{

    font-size:42px;

    margin:0 0 18px 0;

    color:#fff;

    text-align:center;
    font-weight:700;
}

.help-panel h2,
.help-panel p,
.help-panel .help-step,
#closeHelp{

    color:#222;
}

#closeStatistics,
#closeHelp{

    position:absolute;

    top:20px;

    border:none;

    background:none;

    font-size:28px;

    cursor:pointer;

    color:#fff;
    z-index: 300;
}

#closeStatistics{

    right:20px;
}
#closeHelp{

    position:absolute;

    left:20px;
    top:20px;

    z-index:999;

    display:flex;
    align-items:center;
    justify-content:center;

}
.stat-row{

    display:flex;

    justify-content:space-between;

    align-items:center;

    width:min(100%, 460px);

    font-size:28px;

    font-weight:600;

    padding:10px 0;

    border-bottom:1px solid rgba(255,255,255,.2);
}

.stat-row:last-child{

    border-bottom:none;
}

.stat-row span:first-child{

    color:#f8f3b0;
}

.stat-row span:last-child{

    font-size:28px;

    font-weight:700;

    color:#fff;
}

.help-panel p,
.help-panel .help-step{

    width:min(100%, 460px);

    text-align:left;

    color:#222;

    font-size:22px;

    line-height:1.6;
}

.help-panel .help-step{

    padding:8px 0;
    border-bottom:1px solid rgba(255,255,255,.2);
}

.help-panel .help-step:last-of-type{

    border-bottom:none;
}

.help-panel p:last-of-type{

    margin-top:8px;

    color:#0b3d2e;

    font-weight:700;
}
.help-panel::-webkit-scrollbar{

    width:8px;

}

.help-panel::-webkit-scrollbar-track{

    background:transparent;

}

.help-panel::-webkit-scrollbar-thumb{

    background:#0b3d2e;
    border-radius:10px;

}

