#gameCanvas {
    width: 75%;
    height: 75%;
    border: 4px solid black;  /* Optional border to visualize the canvas edges */
    position: absolute;       /* Position the canvas absolutely within its parent container */
    top: 50%;                 /* Position from the top of the viewport */
    left: 50%;                /* Position from the left of the viewport */
    transform: translate(-50%, -50%);  /* Shift it back by 50% of its width and height */
    z-index: -1;              /* Push the canvas to the background */
}

/* Start Screen Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.message-box {
    background-color: #000;
    border: 4px solid #30ff30;
    color: #30ff30;
    padding: 20px 40px;
    text-align: center;
    font-family: 'Press Start 2P', monospace, Arial;
    max-width: 80%;
    box-shadow: 0 0 20px #30ff30;
}

.message-box h2 {
    margin-bottom: 20px;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.message-box p {
    font-size: 1.2em;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Game Controls */
.controls-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.controls-container button {
    background-color: #000;
    color: #30ff30;
    border: 3px solid #30ff30;
    padding: 10px 20px;
    font-size: 1.2em;
    font-family: 'Press Start 2P', monospace, Arial;
    cursor: pointer;
    box-shadow: 0 0 10px #30ff30;
    transition: all 0.2s;
}

.controls-container button:hover {
    background-color: #30ff30;
    color: #000;
}

/* Question Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-content {
    background-color: #000;
    border: 4px solid #30ff30;
    color: #30ff30;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    font-family: 'Press Start 2P', monospace, Arial;
    box-shadow: 0 0 20px #30ff30;
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.option-button {
    background-color: #000;
    color: #30ff30;
    border: 2px solid #30ff30;
    padding: 10px;
    text-align: left;
    font-family: 'Press Start 2P', monospace, Arial;
    font-size: 0.9em;
    cursor: pointer;
}

.option-button:hover {
    background-color: #003300;
}

.option-button[data-correct="true"] {
    background-color: #006600;
    color: white;
}

.option-button[data-incorrect="true"] {
    background-color: #660000;
    color: white;
}

.feedback {
    margin-top: 20px;
    padding: 10px;
    text-align: center;
    display: none;
}

.feedback.correct {
    background-color: #006600;
    color: white;
}

.feedback.incorrect {
    background-color: #660000;
    color: white;
}

#playerHealth, #enemyHealth {
    position: fixed;
    top: 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    padding: 8px 12px;
    background-color: black;
    border: 2px solid #30ff30;
    color: #30ff30;
    z-index: 50;
}

#playerHealth {
    left: 20px;
}

#enemyHealth {
    right: 20px;
}

#enemyAttackModal .options-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

#enemyAttackModal button {
    background-color: #000;
    color: #30ff30;
    border: 3px solid #30ff30;
    padding: 10px 20px;
    font-size: 1.1em;
    font-family: 'Press Start 2P', monospace, Arial;
    cursor: pointer;
    box-shadow: 0 0 10px #30ff30;
    transition: all 0.2s;
}

#enemyAttackModal button:hover {
    background-color: #30ff30;
    color: black;
}

/* Back to Welcome Button Style */
.back-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.2em;
    font-family: 'Press Start 2P', monospace, Arial;
    color: #30ff30;
    background-color: #000;
    border: 3px solid #30ff30;
    text-decoration: none;
    box-shadow: 0 0 10px #30ff30;
    transition: all 0.3s ease;
    cursor: pointer;
    position: absolute;
    bottom: 40px;         /* Keep it below the "Press Space" message */
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;          /* Ensure it's above the canvas but below modals */
}

.back-button:hover {
    background-color: #30ff30;
    color: #000;
    box-shadow: 0 0 20px #30ff30;
}

    