body {
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    touch-action: none;
}

canvas {
    border: 2px solid #000;
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.score {
    text-align: center;
    font-size: 24px;
    margin: 20px 0;
}

.controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(3, 60px);
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 15px;
}

.control-btn {
    border: none;
    background: #4CAF50;
    color: white;
    font-size: 28px;
    border-radius: 50%;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    background: #45a049;
    transform: scale(0.95);
}

.hidden-desktop {
    display: none;
}

@media (max-width: 768px) {
    .hidden-desktop {
        display: block;
    }
    
    canvas {
        margin-bottom: 200px;
    }
}