* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #111;
    color: white;
    text-align: center;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

canvas {
    background: black;
    display: none;
    margin: 0 auto;
    border: 4px solid #00c6ff;
    border-radius: 15px;
    box-shadow: 0 0 20px #00c6ff;
    max-width: 95vw;
    max-height: 50vh;
    touch-action: none;
}

button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    transform: scale(0.95);
}

.title {
    font-size: 40px;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from { color: #0ff; }
    to { color: #f0f; }
}

#score {
    margin: 10px 0;
    font-size: 16px;
}

/* Mobile controls */
.mobile-controls {
    display: none;
    padding: 10px 0;
    touch-action: manipulation;
}

.mobile-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mobile-btn {
    width: 70px;
    height: 70px;
    background: rgba(0, 198, 255, 0.15);
    border: 2px solid #00c6ff;
    border-radius: 14px;
    color: #00c6ff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s, transform 0.1s;
}

.mobile-btn:active {
    background: rgba(0, 198, 255, 0.4);
    transform: scale(0.9);
}

@media (max-width: 500px) {
    .title { font-size: 28px; }

    .mobile-controls {
        display: block;
    }

    canvas {
        max-height: 45vh;
    }
}
