* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #04070e;
    font-family: 'Rajdhani', sans-serif;
    color: #e2e8f0;
    cursor: crosshair;
}

.font-orbitron {
    font-family: 'Orbitron', sans-serif;
}

#game-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

#damage-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
    overflow: hidden;
}

#hud-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.interactive-ui {
    pointer-events: auto;
}

.tactical-panel {
    background: rgba(7, 13, 25, 0.86);
    border: 1px solid rgba(56, 189, 248, 0.36);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.16), inset 0 0 12px rgba(14, 165, 233, 0.08);
    backdrop-filter: blur(6px);
}

.tactical-panel-amber {
    background: rgba(20, 14, 7, 0.88);
    border: 1px solid rgba(245, 158, 11, 0.48);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.18);
    backdrop-filter: blur(6px);
}

.scanline-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.16) 50%, rgba(0,0,0,0.16));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 5;
    opacity: 0.4;
}

.vignette-overlay {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 110px rgba(0, 0, 0, 0.85);
    pointer-events: none;
    z-index: 6;
    transition: box-shadow 0.2s ease;
}

.damage-flash {
    box-shadow: inset 0 0 145px rgba(239, 68, 68, 0.82) !important;
}

.btn-cyber {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.28) 0%, rgba(3, 105, 161, 0.52) 100%);
    border: 1px solid #38bdf8;
    color: #e0f2fe;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.18s ease;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
    cursor: pointer;
}

.btn-cyber:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.48) 0%, rgba(2, 132, 199, 0.75) 100%);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.55);
    transform: translateY(-1px);
}

.btn-cyber:active {
    transform: translateY(1px);
}

.dpad-btn {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.42);
    color: #38bdf8;
    transition: all 0.1s ease;
    cursor: pointer;
}

.dpad-btn.active, .dpad-btn:active {
    background: rgba(56, 189, 248, 0.38);
    border-color: #7dd3fc;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
}

.dmg-float {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 15px;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0,0,0,0.95);
    transform: translate(-50%, -50%);
    transition: opacity 0.1s linear;
}

@keyframes pulseAlert {
    0%, 100% { opacity: 0.96; transform: scale(1); }
    50% { opacity: 0.42; transform: scale(0.98); }
}

.alert-pulse {
    animation: pulseAlert 0.9s infinite ease-in-out;
}