body {
    margin: 0;
    overflow: hidden; /* Hide scrollbars */
    font-family: sans-serif;
    background-color: #222;
    color: #eee;
}

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

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicking through UI to canvas */
}

#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    color: white;
    font-size: 1.2em;
}

#hud div {
    margin-bottom: 5px;
}

.menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    display: none; /* Hidden by default */
    pointer-events: all; /* Menus should be interactive */
}

.menu.active {
    display: block;
}

.menu h1 {
    margin-top: 0;
    color: #ffcc00;
}

.menu h2 {
    color: #ff4444;
}

.menu button {
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: #ffcc00;
    border: none;
    border-radius: 5px;
    color: #333;
    margin-top: 15px;
}

.menu button:hover {
    background-color: #ffe066;
}

/* Mobile Controls */
#mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px; /* Adjust height as needed */
    display: none; /* Hidden by default, shown via JS */
    pointer-events: none; /* Container doesn't block */
}

#joystick-area {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 120px; 
    height: 120px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: all; /* Joystick needs interaction */
}

#joystick-label {
    position: absolute;
    bottom: 145px; /* Position above joystick area (20 + 120 + 5 buffer) */
    left: 20px; /* Align with joystick area */
    width: 120px; /* Match joystick area width */
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    pointer-events: none; /* Label shouldn't block */
}

#attack-button-area {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 0, 0, 0.4);
    border-radius: 50%;
    pointer-events: all; /* Attack button needs interaction */
    display: flex; /* Optional: Center text inside */
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
}

/* Class to show mobile controls */
body.is-mobile #mobile-controls {
    display: block;
}

/* Optional: Hide desktop instructions on mobile */
/* body.is-mobile #start-screen p .desktop-instruction {
    display: none;
} */ 