/* Basic reset and full screen setup */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: sans-serif;
    background-color: #70c5ce;
    /* Improve touch interactions */
    touch-action: manipulation; /* Prevent zooming on double-tap */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */

}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #70c5ce;
}

#ui {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #111;
    font-size: clamp(1em, 3vw, 1.4em); /* Responsive font size */
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 8px;
    z-index: 10;
    font-weight: bold;
}

.lives-container {
    color: #d9534f;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, #4169E1 0%, #27408B 100%);
    color: white; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    text-align: center; z-index: 20; padding: 10px; box-sizing: border-box;
}

.overlay h2 {
    margin-bottom: 20px; font-size: clamp(1.8em, 6vw, 2.8em);
    color: #FFEB3B; text-shadow: 2px 2px 3px rgba(0,0,0,0.5);
}

.overlay p {
    margin: 8px 0; max-width: 90%; font-size: clamp(0.9em, 3vw, 1.2em);
}

.overlay button {
    padding: 12px 25px; font-size: clamp(1em, 4vw, 1.3em);
    margin-top: 25px; cursor: pointer; border: none;
    border-radius: 8px; background-color: #5cb85c;
    color: white; font-weight: bold;
    transition: background-color 0.2s ease; box-shadow: 0 4px #4cae4c;
}
.overlay button:active { box-shadow: 0 2px #4cae4c; transform: translateY(2px); }
.overlay button:hover { background-color: #4cae4c; }

#game-over-screen h2 { color: #f0ad4e; }


/* --- Mobile Controls Styling --- */
#mobile-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* height: 80px; Height determined by content */
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    justify-content: space-around; /* Distribute buttons evenly */
    align-items: center;
    padding: 10px 5px; /* Padding around buttons */
    box-sizing: border-box;
    z-index: 15; /* Above canvas, below overlays */
    gap: 5px; /* Space between buttons */
}

.choice-btn {
    flex-grow: 1; /* Allow buttons to grow */
    flex-basis: 0; /* Start with equal basis */
    padding: 15px 5px; /* Vertical padding, minimal horizontal */
    font-size: clamp(1.1em, 4vw, 1.5em); /* Responsive font size */
    font-weight: bold;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: #f0f0f0;
    color: #333;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.1s ease;
    overflow: hidden; /* Prevent text overflow issues */
    white-space: nowrap; /* Keep ASN on one line */
}

.choice-btn:active {
    background-color: #d0d0d0;
}

.choice-btn:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}