@import url('https://fonts.googleapis.com/css2?family=Silkscreen&display=swap');

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

.hidden{
    visibility: hidden;
}

body{
    background: #263A99;
    min-height: 100vh;
    font-family: "Silkscreen", monospace;
    color: #F0EBE5;
    display: flex;
    justify-content: center;
}

#loader-page{
    display: flex;
    text-align: center;
    margin-top: 45vh;
    font-size: 30px;
    animation: blink 1s linear infinite;
}

@keyframes blink {
    50% {opacity: 0}
}

.overlay {
    display: none;
    position: fixed;    /* covers the entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);  /* dim background */
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.modal {
    background: #263A99;
    border: 3px solid #97B4DE;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: 'Silkscreen', monospace;
}

#game-container{
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border: 4px solid #97B4DE
}

#game-header{
    border-bottom: 4px solid #97B4DE;
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 25px;
    color: #F0EBE5;
}

#setting{
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
}

#infobtn {
    background: none;
    border: none;
    color: #F0EBE5;
    font-size: 35px;
    cursor: pointer;
    padding: 0;
}

.btn {
    background: #F0EBE5;
    border: #97B4DE;
    color: #2A2829;
    font-size: 20px;
    font-family: "Silkscreen", monospace;
    cursor: pointer;
    padding: 10px;
}

.btn:hover {
    background: #97B4DE;
}

#finished-buttons{
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: center;
    gap: 12px;
}

#game-body{
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
}

#hangman-panel {
    padding: 24px 20px;
    border-right: 4px solid #97B4DE;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#hangman-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#hangman-svg {
    width: auto;
    max-height: 60vh;
}

#hint-section{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#hint{
    font-size: 30px;
    color: #F0EBE5;
}

#info-panel{
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-section{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label{
    padding: 15px 0;
    font-size: 25px;
    color: #DCD0BE;
    letter-spacing: 1px;
}

#theme{
    font-size: 30px;
    color: #F0EBE5;
}

#correct{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#input {
    width: 150px;
    height: 70px;
    padding-bottom: 0;
    background: #F0EBE5;
    color: #263A99;
    border: 2px solid #97B4DE;
    border-radius: 10px;
    font-weight: bold;
    font-family: 'Silkscreen', monospace;
    font-size: 35px;
    outline: none;
    text-align: center;
}

#alreadyUsed{
    padding: 8px 0;
}

.char-box {
    width: 70px;
    height: 80px;
    border: 3px solid #97B4DE;
    background: #F0EBE5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #2A2829;
}

.char-box-empty {
    width: 70px;
    height: 80px;
    border: 3px solid #97B4DE;
    background: #2A2829;
    display: flex;
    align-items: center;
    justify-content: center;
}

.word-group{
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    margin-right : 16px;
}

#guessed-display{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.guessed-correct{
    width: 25px;
    height: 35px;
    border: 2px solid #fff;
    background: lightgreen;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: black;
}

.guessed-wrong{
    width: 25px;
    height: 35px;
    border: 2px solid #fff;
    background: lightcoral;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: black;
}

#status{
    font-size: 20px;
}

@media (max-width: 720px){
    #game-header{
        padding: 10px 20px;
    }

    #game-body{
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    #hangman-panel{
        order: 1;
        border-right: none;
        gap: 12px;
        padding: 15px 10px;
        min-height: 39vh;
    }

    #hint{
        text-align: center;
    }

    #info-panel{
        order: 0;
        min-height: 28vh;
        max-height: none;
        gap: 10px;
    }

    .info-section:has(#theme)           { order: 0; }
    .info-section:has(#correct)         { order: 1; }
    .info-section:has(#input)           { order: 2; }
    .info-section:has(#guessed-display) { order: 3; }

    .word-group{
        flex-wrap: wrap;
    }

    .char-box-empty {
        width: 5vh !important;
        height: 5vh !important;
    }

    .char-box{
        width: 5vh !important;
        height: 5vh !important;
        font-size: 20px;
    }

    #game-container{
        border: none;
    }

    .info-section{
        flex-direction: row;
        justify-content: left;
        align-items: center;
        gap: 8px;
    }

    .word-group{
        justify-content: center;
        align-items: center;
        margin-right: 0;
    }

    #status{
        text-align: center;
    }

    #alreadyUsed{
        text-align: center;
        font-size: 12px;
    }

    #input{
        height: 40px;
        font-size: 20px;
    }

    #input-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 3px;
    }

    .label{
        padding: 0;
        text-align: left;
        font-size: 15px;
    }

    #hangman-svg {
        max-height: 20vh;
    }

    #hint-section{
        align-items: center;
    }

    #hint{
        font-size: 20px;
    }

    #status{
        font-size: 15px;
    }
}




















