* {
    box-sizing: border-box;
}

body {
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    gap: 16px;
    font-family: monospace;
}

canvas {
    border: 2px solid #e94560;
    background: #16213e;
    cursor: crosshair;
}

.buttons {
    display: flex;
    gap: 12px;
}

button {
    background: #0f3460;
    color: white;
    border: 2px solid #e94560;
    padding: 10px 24px;
    font-size: 14px;
    font-family: monospace;
    cursor: pointer;
    letter-spacing: 2px;
    transition: background 0.2s;
}

button:hover { background: #e94560; }
button.active { background: #e94560; }

#rage {
    background: #7b0000;
    border-color: #ff1744;
    color: #ff8a80;
    display: none;
    animation: pulse 1s infinite;
}

#rage.visible { display: block; }
#rage:hover { background: #ff1744; color: white; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 8px #ff1744; }
    50%       { box-shadow: 0 0 20px #ff1744; }
}

/* Модальное окно настроек */
#settings-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#settings-modal.visible { display: flex; }

.modal-box {
    background: #16213e;
    border: 2px solid #e94560;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 280px;
}

.modal-box h2 {
    color: #e94560;
    margin: 0;
    text-align: center;
    letter-spacing: 3px;
}

.color-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e0e0e0;
    gap: 16px;
}

.color-row input[type="color"] {
    width: 48px;
    height: 32px;
    border: 2px solid #e94560;
    background: none;
    cursor: pointer;
    padding: 0;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Джойстик движения */
#joystick-container {
    display: none;
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 120px;
    height: 120px;
    z-index: 50;
}

#joystick-base {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.2);
    border: 2px solid #e94560;
    position: absolute;
}

#joystick-stick {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.6);
    border: 2px solid #e94560;
    position: absolute;
    top: 35px;
    left: 35px;
    touch-action: none;
}

/* Джойстик прицела */
#aim-container {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 120px;
    height: 120px;
    z-index: 50;
}

#aim-base {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 23, 68, 0.2);
    border: 2px solid #ff1744;
    position: absolute;
}

#aim-stick {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 23, 68, 0.6);
    border: 2px solid #ff1744;
    position: absolute;
    top: 35px;
    left: 35px;
    touch-action: none;
}