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

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    padding: 20px;
}

#machine-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#canvas {
    border: 5px solid #C0C0C0;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(0, 0, 0, 0.3);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    max-width: 100%;
    height: auto;
}

#controls {
    width: 100%;
    max-width: 600px;
}

.hidden {
    display: none !important;
}

button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
    #canvas {
        max-width: 100%;
        width: 100%;
    }
    
    #controls button {
        font-size: 14px;
        padding: 10px 16px;
    }
}

/* Retro glow animation */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 20px currentColor; }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}