body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
}

.game-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

#instruction-text {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #555;
}

input[type="text"] {
    width: calc(100% - 20px);
    padding: 10px;
    font-size: 1.2em;
    border: 2px solid #ccc;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    box-sizing: border-box; /* Ensures padding and border are included in the element's total width and height */
}

input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#letter-input {
    width: 60px; /* Smaller width for single letter input */
    text-transform: lowercase; /* Ensure input is lowercase */
}

#count-button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
}

#count-button:hover {
    background-color: #0056b3;
}

#result-display {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
    min-height: 1.5em; /* To prevent layout shift when empty */
    margin-bottom: 10px;
}

#message {
    min-height: 1.5em;
    font-size: 1.1em;
    color: #dc3545;
}

#letter-count-box {
    margin-top: 20px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    font-size: 1.1em;
    color: #343a40;
    border: 1px solid #ced4da;
}

#word-length-display {
    font-weight: bold;
    color: #007bff;
}