/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #000;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#app {
    width: 100%;
    height: 100vh;
}

canvas {
    display: block;
}

/* Joystick Styles */
#joystick-zone {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 100px;
    height: 100px;
    z-index: 10000;
}

#joystick-base {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

#joystick-knob {
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; height: 40px;
    background: rgba(0, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    border: 1px solid #00ffff;
}

/* UI Overlay */
#ui-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 20000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    font-family: 'Courier New', monospace;
    color: #00ffff;
    transition: opacity 1s;
}

.hidden { 
    opacity: 0; 
    pointer-events: none; 
}

.loader-bar {
    width: 300px; height: 4px; background: #003333; margin: 20px 0;
    position: relative; overflow: hidden;
}

.loader-progress {
    width: 0%; height: 100%; background: #00ffff;
    box-shadow: 0 0 10px #00ffff;
    transition: width 0.2s;
}

.box-message {
    border: 1px solid #00ffff;
    padding: 40px;
    background: rgba(0, 20, 40, 0.9);
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    max-width: 400px;
}

.cyber-btn {
    background: transparent; border: 1px solid #00ffff; color: #00ffff;
    padding: 10px 30px; margin: 10px; cursor: pointer;
    font-family: inherit; font-size: 16px; letter-spacing: 2px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.cyber-btn:hover { 
    background: #00ffff; 
    color: #000; 
    box-shadow: 0 0 15px #00ffff; 
}

.secondary { 
    opacity: 0.7; 
    border-color: #666; 
    color: #aaa; 
}

.secondary:hover { 
    opacity: 1; 
    border-color: #fff; 
    color: #fff; 
    box-shadow: 0 0 10px #fff; 
}

.shutdown-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 30000;
    margin: 0;
    padding: 8px 14px;
    font-size: 12px;
    letter-spacing: 1.5px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

#keybind-hud {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15000;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    color: #aefcff;
    border-top: 1px solid rgba(0, 255, 255, 0.45);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 10, 20, 0.55));
    backdrop-filter: blur(3px);
    font-size: 12px;
    letter-spacing: 0.6px;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

#keybind-hud.active {
    opacity: 1;
    transform: translateY(0);
}

#keybind-hud strong {
    color: #00ffff;
    margin-right: 6px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .shutdown-btn {
        top: 12px;
        right: 12px;
        padding: 7px 12px;
        font-size: 11px;
    }

    #keybind-hud {
        gap: 10px;
        padding: 10px 12px;
        font-size: 11px;
    }
}
