
body {
    margin: 0;
    padding: 15px;
    background: #FFA500;
    font-family: Arial, sans-serif;
    color: #222;
}


.game {
    max-width: 600px;
    margin: 20px auto;
    padding: 25px;
    background: white;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}


/* Title */

h1 {
    margin: 0 0 2px 0;
    font-size: 24px;
    letter-spacing: 4px;
}


/* Instructions */

.instructions {
    margin-top: 0;
    font-size: 17px;
    color: #666;
}


/* Current word */

#currentword {
    min-height: 55px;
    margin: 30px 0 20px;
    font-size: 38px;
    font-weight: bold;
    letter-spacing: 7px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 12px;
}


/* Rank */

#rank {
    margin-top: 20px;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
}


#progress {
    margin-top: 6px;
    font-size: 15px;
    color: #666;
}


/* Special rank: Linguist */

#rank.linguist {
    font-size: 34px;
    letter-spacing: 4px;
    color: #555;
}


/* Special rank: Wordmaster */

#rank.wordmaster {
    font-size: 40px;
    letter-spacing: 5px;
    font-weight: bold;
    color: #222;
}


/* Letters */

#letters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    max-width: 500px;
    margin: 25px auto 0;
}


.letter {
    width: 58px;
    height: 58px;

    font-size: 25px;
    font-weight: bold;

    border: none;
    border-radius: 10px;

    background: #333;
    color: white;

    cursor: pointer;

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


.letter:hover {
    background: #555;
}


.letter:active {
    transform: scale(0.94);
}


/* Used letters */

.letter.used,
.letter.used:hover {
    background: #aaa !important;
    color: #eee !important;
    cursor: default;
}


/* Controls */

.controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}


.controls button {
    padding: 12px 15px;

    font-size: 14px;
    font-weight: bold;

    border: none;
    border-radius: 7px;

    background: #ddd;
    color: #222;

    cursor: pointer;
}


#enter {
    background: #333;
    color: white;
}


.controls button:active {
    transform: scale(0.96);
}


/* Message */

#message {
    min-height: 30px;
    margin-top: 18px;
    font-weight: bold;
}


/* Score */

.score {
    margin-top: 10px;
    font-size: 20px;
}


/* Hint */

#hint {
    margin-top: 10px;
    font-size: 24px;
    padding: 6px 14px;
    cursor: pointer;
}


#hintbox {
    display: none;
    margin: 10px auto 15px auto;
    padding: 12px;
    max-width: 320px;
    text-align: left;
}


#hintbox.show {
    display: block;
}


.hint-title {
    font-weight: bold;
    margin-bottom: 10px;
}


.hint-group {
    margin: 6px 0;
}


.hint-letter {
    display: inline-block;
    width: 25px;
    font-weight: bold;
}


.hint-details {
    font-size: 14px;
}


/* Found words */

.found {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}


.found h2 {
    font-size: 20px;
}


#foundwords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}


.foundword {
    display: inline-block;
    padding: 7px 10px;

    background: #e8e8e8;
    border-radius: 5px;

    font-size: 15px;
}


/* Small screens */

@media (max-width: 500px) {

    body {
        padding: 8px;
    }


    .game {
        margin: 5px auto;
        padding: 18px 12px;
    }


    h1 {
        font-size: 22px;
        letter-spacing: 3px;
    }


    .instructions {
        font-size: 15px;
    }


    #currentword {
        margin-top: 20px;
        font-size: 32px;
        letter-spacing: 5px;
    }


    #rank {
        font-size: 20px;
    }


    #rank.linguist {
        font-size: 30px;
    }


    #rank.wordmaster {
        font-size: 34px;
    }


    #letters {
        gap: 7px;
    }


    .letter {
        width: 52px;
        height: 52px;
        font-size: 23px;
    }


    .controls button {
        padding: 14px 16px;
    }

}
