body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #2b3a2a; /* Dark grassy tone */
    overflow: hidden;
    font-family: sans-serif;
    touch-action: none; /* Prevents mobile browser pull-to-refresh */
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.top-bar {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-around;
    font-weight: bold;
}

.build-menu, .action-menu {
    pointer-events: auto; /* Re-enable clicks for buttons */
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
}

button {
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    background: #444;
    color: white;
    box-shadow: 0 4px 0 #222;
}

button:active {
    transform: translateY(4px);
    box-shadow: none;
}

.btn-primary { background: #007bff; box-shadow: 0 4px 0 #0056b3; }
.btn-success { background: #28a745; box-shadow: 0 4px 0 #1c7430; }