body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #1a1a2e;
    color: white;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

h1 {
    color: #f1c40f;
    margin: 20px 0;
    text-align: center;
}

#game-container {
    position: relative;
    margin: 0 auto;
}

#game-canvas {
    border: 3px solid #16213e;
    background-color: #0f0f1a;
    display: block;
    margin: 0 auto;
}

#score-display {
    font-size: 24px;
    margin: 15px 0;
    color: #2ecc71;
    text-align: center;
}

#controls {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

button:hover {
    background-color: #2980b9;
}

button:active {
    transform: scale(0.95);
}


#mobile-controls {
    display: none;
    margin-top: 30px;
    width: 100%;
    max-width: 300px;
}

.control-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.control-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 28px;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
    background-color: #2980b9;
    transform: scale(0.9);
}

.up-btn {
    margin-bottom: 15px;
}

.instructions {
    margin-top: 30px;
    color: #b8b8b8;
    text-align: center;
    max-width: 700px;
    padding: 0 20px;
    line-height: 1.5;
}


@media (max-width: 768px) {
    #game-canvas {
        width: 100%;
        height: auto;
        max-width: 400px;
        max-height: 400px;
    }
    
    #mobile-controls {
        display: block;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .instructions {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
        margin: 15px 0;
    }
    
    #score-display {
        font-size: 20px;
    }
    
    button {
        padding: 8px 16px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin: 0 8px;
    }
    
    .up-btn {
        margin-bottom: 10px;
    }
    
    #controls {
        gap: 10px;
    }
}


@keyframes btnPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.button-press {
    animation: btnPress 0.2s ease;
}