body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    font-family: 'Orbitron', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* HUD Styling */
#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 40px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 0 0 20px 0;
    border-left: 2px solid #0ff;
    backdrop-filter: blur(2px);
}

.hud-item {
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
}

.label {
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 1px;
}

.value {
    font-size: 24px;
    font-weight: bold;
}

#controls-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 15px;
}

@media (max-width: 768px) {
    #controls-hint {
        display: none;
    }
}

#pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0ff;
    color: #0ff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    z-index: 100;
}

#pause-btn:hover {
    background: #0ff;
    color: #000;
}

/* Mobile UI - Simplified */
#mobile-ui {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@media (max-width: 1024px) {
    #mobile-ui {
        display: block;
    }
}

/* Simplified Steering Buttons */
#steering-controls {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

/* Simplified Pedals */
#pedals {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
}

/* Action Buttons */
#action-buttons {
    position: absolute;
    top: 80px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

/* Mobile Button Base Styling */
.mobile-btn {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(0, 255, 255, 0.8);
    border-radius: 12px;
    color: #0ff;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    touch-action: none;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.1);
    transition: all 0.1s ease;
}

.mobile-btn:active {
    background: rgba(0, 255, 255, 0.9);
    color: #000;
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.6), inset 0 2px 10px rgba(0, 0, 0, 0.3);
    border-color: #fff;
}

/* Pedal Buttons (Gas & Brake) */
.pedal {
    width: 100px;
    height: 100px;
    font-size: 32px;
}

/* Steering Buttons */
.steer-btn {
    width: 90px;
    height: 90px;
    font-size: 28px;
}

/* Action Buttons (Horn & Camera) */
.action-btn {
    width: 60px;
    height: 60px;
    font-size: 20px;
    border-radius: 50%;
}

/* Overlay Screens */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 20, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    transition: opacity 0.3s;
    z-index: 200;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

h1 {
    color: #fff;
    font-size: 64px;
    margin: 0;
    letter-spacing: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    text-align: center;
}

@media (max-width: 600px) {
    h1 {
        font-size: 40px;
        letter-spacing: 5px;
    }
}

.subtitle {
    color: #0ff;
    font-size: 20px;
    letter-spacing: 5px;
    margin-bottom: 40px;
}

h1.danger {
    color: #ff3333;
    text-shadow: 0 0 20px #ff0000;
}

p {
    color: #aaa;
    font-size: 18px;
    margin-top: 10px;
    letter-spacing: 2px;
}

button:not(.icon-btn):not(.mobile-btn) {
    margin-top: 30px;
    background: transparent;
    border: 2px solid #0ff;
    color: #0ff;
    padding: 15px 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 5px #0ff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}

button:not(.icon-btn):not(.mobile-btn):hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

#restart-btn {
    border-color: #ff3333;
    color: #ff3333;
    text-shadow: 0 0 5px #ff3333;
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.2);
}

#restart-btn:hover {
    background: #ff3333;
    color: #000;
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.6);
}