* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #f7f7f7, #e9e9e9);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 460px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

h1 {
    margin-top: 0;
    margin-bottom: 15px;
}

img {
    width: 100%;
    max-width: 220px;
    border-radius: 12px;
    margin-bottom: 20px;
}

canvas {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: #222;
    border: 4px solid #444;
    border-radius: 12px;
    display: block;
    margin: auto;
}

#controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#controls > div {
    display: flex;
    gap: 12px;
}

#controls button {
    width: 72px;
    height: 72px;
    border: none;
    border-radius: 16px;
    background: #4caf50;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
    transition: transform .1s, background .2s;
    touch-action: manipulation;
}

#controls button:active {
    transform: scale(0.95);
    background: #388e3c;
}

p {
    margin-top: 20px;
    color: #666;
}

@media (max-width: 500px) {
    .container {
        padding: 15px;
    }

    #controls button {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
}