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

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

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

.screen {
    display: none; /* Hidden by default, JavaScript controls visibility */
}

.screen.active {
    display: block;
}

#setup-screen .setting {
    margin-bottom: 15px;
}

#setup-screen label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#setup-screen select,
#word-input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    margin: 10px 5px;
    transition: background-color 0.3s ease;
}

button:hover:not(:disabled) {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
}

#score-board,

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.note-image {
    height: 200px; /* Adjust note image height */
    margin: 0 -10px; /* Overlap notes slightly for a continuous look */
    vertical-align: bottom; /* Align to the bottom of the container */
    object-fit: contain; /* Ensure image scales within its space */
}


#word-input-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#word-input {
    flex-grow: 1;
    max-width: 300px;
}

#submit-word-guess-btn {
    padding: 10px 15px;
    font-size: 1em;
}

.definition-box {
    background-color: #e0f2f1;
    border: 1px solid #b2dfdb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 1.1em;
    color: #00796b;
    min-height: 50px; /* Ensure space even when empty */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
}

#message-area {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    min-height: 20px; /* Ensure space for messages */
}

.message-area.success {
    background-color: #d4edda;
    color: #155724;
}

.message-area.error {
    background-color: #f8d7da;
    color: #721c24;
}

.message-area.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

#game-controls {
    margin-top: 20px;
}

#missed-words-definitions {
    margin-top: 30px;
    padding: 15px;
    background-color: #ffe0b2;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    text-align: left;
    display: none; /* Hidden by default, shown on game end */
}

#missed-words-definitions h3 {
    color: #e65100;
    margin-top: 0;
}

.missed-words-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.missed-words-list li {
    margin-bottom: 5px;
}

/* Original Boggle-style grid cells (hidden for this game) */
.grid-cell {
    width: 100px;
    height: 100px;
    border: 2px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.grid-cell.selected {
    background-color: #a5d6a7;
    border-color: #4CAF50;
    transform: scale(1.05);
}

.grid-cell.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #game-container {
        padding: 20px;
    }

    #header-bar {
        flex-direction: column;
        align-items: center;
    }

    #score-board,
    #current-player-display,
    #timer-display {
        margin-bottom: 10px;
    }

    #word-input-section {
        flex-direction: column;
        gap: 5px;
    }

    #word-input {
        max-width: 100%;
    }
}
.hidden {
    display: none;
}
