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

body {
    background: #0a0a0a;
    overflow: hidden;
    font-family: 'VT323', monospace;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

#mobile-controls {
    display: none;
    justify-content: space-between;
    padding: 20px;
    pointer-events: none;
}

.ctrl-btn {
    width: 70px;
    height: 70px;
    border: 3px solid rgba(194, 163, 102, 0.6);
    border-radius: 12px;
    background: rgba(30, 30, 30, 0.7);
    color: rgba(194, 163, 102, 0.9);
    font-family: 'VT323', monospace;
    font-size: 20px;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    transition: all 0.1s ease;
}

.ctrl-btn:active {
    background: rgba(194, 163, 102, 0.3);
    transform: scale(0.95);
}

#left-controls, #right-controls {
    display: flex;
    gap: 15px;
}

/* Show mobile controls on touch devices */
@media (hover: none) and (pointer: coarse) {
    #mobile-controls {
        display: flex;
    }
}

@media (max-width: 768px) {
    #mobile-controls {
        display: flex;
    }
    
    .ctrl-btn {
        width: 60px;
        height: 60px;
        font-size: 16px;
    }
}

/* Scanline effect */
#canvas::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
}