body {
    font-family: Monospace;
    text-align: center;
    margin: 20px;
    background-color: #FCF5E5;
}

h1 {
    margin-bottom: 20px;
}

.answer-grid {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.answer {
    width: 300px;
    height: 30px; /* Fixed height */
    margin: 5px 0;
    background-color: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 5px;
    padding: 0 10px;
    font-size: 16px;
    text-align: left;
    transition: transform 0.3s ease;
    line-height: 30px;
    white-space: nowrap;    /* No wrapping */
    overflow: hidden;       /* Hide overflow if text is too large */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.answer .area {
    margin-left: auto;
    text-align: right;
}

.input-section {
    margin-top: 20px;
}

input[type="text"] {
    padding: 5px;
    font-size: 16px;
    width: 200px;
    margin-right: 10px;
    border: 2px solid #ccc;
}

#submitGuess {
    padding: 5px 10px;
    font-size: 16px;
    background-color: #008CBA;
    color: white;
    border: none;
    border-radius: 5px;
}
#submitGuess:hover {
    background-color: #006f8a;
}

.lives {
    display: none;
    margin-bottom: 10px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.heart {
    width: 24px;
    height: 24px;
    background-size: cover;
}
.heart.alive {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="red" viewBox="0 0 24 24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}
.heart.dead {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="gray" viewBox="0 0 24 24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}

.correct {
    background-color: #C1E1C1 !important;
}
.incorrect {
    background-color: #FFD6D6 !important;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffcccc;
    color: #cc0000;
    padding: 15px;
    border: 2px solid #cc0000;
    border-radius: 5px;
    font-size: 18px;
    display: none;
    z-index: 1000;
}
.popup.success {
    background-color: #ccffcc;
    color: #008000;
    border-color: #008000;
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

#welcome-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-screen {
    display: none;
}

#play-button, #play-again-button {
    padding: 10px 20px;
    font-size: 18px;
    background-color: #008CBA;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}
#play-button:hover, #play-again-button:hover {
    background-color: #005f6a;
}

#end-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.end-popup-content {
    position: relative;
    background: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    width: 300px;
    min-height: 400px;
}
.end-popup-content #resultsText {
    margin-top: 20px;
    font-size: 18px;
}
.end-popup-content #timeText {
    margin-top: 10px;
    font-size: 18px;
}
.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.correct-animate {
    animation: bulge 0.4s ease;
}

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