* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body {
    background-color: #05050a;
    color: #00f0ff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 1000px;
    height: 600px;
    max-width: 100vw;
    max-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    border: 2px solid #00f0ff33;
    border-radius: 8px;
    background: #090912;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0b0b16 0%, #030308 100%);
}

/* HUD Overlay styling */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    pointer-events: none;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
    font-size: 15px;
    z-index: 10;
}

.hud-group {
    display: flex;
    gap: 20px;
}

.hud-item span {
    color: #ffffff;
}

/* Screens Styling */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.88);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
    padding: 20px;
}

.screen h1 {
    font-size: 3rem;
    color: #00f0ff;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.screen p {
    color: #a0a0c0;
    font-size: 1rem;
    max-width: 480px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.instructions {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    text-align: left;
    font-size: 0.9rem;
    color: #d0d0f0;
}

.instructions b {
    color: #00f0ff;
}

.btn {
    background: transparent;
    color: #00f0ff;
    border: 2px solid #00f0ff;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn:hover {
    background: #00f0ff;
    color: #05050a;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* On-Screen Touch Control Styling */
#touch-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 25px;
    pointer-events: none;
    z-index: 15;
}

.touch-group-left, .touch-group-right {
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

.touch-btn {
    width: 65px;
    height: 65px;
    background: rgba(0, 240, 255, 0.15);
    border: 2px solid rgba(0, 240, 255, 0.5);
    color: #00f0ff;
    font-size: 1.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(3px);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.touch-btn:active, .touch-btn.active {
    background: rgba(0, 240, 255, 0.5);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
}

.thrust-btn {
    background: rgba(0, 255, 102, 0.2);
    border-color: rgba(0, 255, 102, 0.6);
    color: #00ff66;
}

.thrust-btn:active, .thrust-btn.active {
    background: rgba(0, 255, 102, 0.5);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.8);
}

/* Responsive layout adjustments for mobile screens */
@media (max-width: 768px) {
    body {
        height: 100vh;
        width: 100vw;
    }
    #game-container {
        width: 100vw;
        height: 100vh;
        border: none;
        border-radius: 0;
    }
    .screen h1 {
        font-size: 2.2rem;
    }
    .screen p {
        font-size: 0.9rem;
    }
    .touch-btn {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }
}