body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-color: #000;
}

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

#game-canvas {
    display: block;
    background-color: #000;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.title-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.title-text {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px #000;
}

.start-button {
    font-size: 1.5rem;
    padding: 1rem 2rem;
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    cursor: pointer;
    transition: all 0.3s;
}

.start-button:hover {
    background-color: #555;
}

.hud {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #fff;
    font-size: 1.2rem;
    pointer-events: none;
}

.hud-item {
    margin-bottom: 0.5rem;
}

.pause-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.pause-text {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px #000;
}

.resume-button, .quit-button {
    font-size: 1.5rem;
    padding: 1rem 2rem;
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    cursor: pointer;
    margin: 0.5rem;
    transition: all 0.3s;
}

.resume-button:hover, .quit-button:hover {
    background-color: #555;
}

.game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.game-over-text {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px #000;
}

.restart-button {
    font-size: 1.5rem;
    padding: 1rem 2rem;
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    cursor: pointer;
    transition: all 0.3s;
}

.restart-button:hover {
    background-color: #555;
}

.result-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.result-text {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px #000;
}

.score-text {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2rem;
}

.back-button {
    font-size: 1.5rem;
    padding: 1rem 2rem;
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    cursor: pointer;
    transition: all 0.3s;
}

.back-button:hover {
    background-color: #555;
}

.virtual-pad {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: auto;
}

.virtual-pad-stick {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.action-buttons {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.action-button {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.action-button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
    .virtual-pad, .action-buttons {
        display: none;
    }
}
