body {
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1a1a1a;
    font-family: 'Arial', sans-serif;
    box-sizing: border-box;
}

.game-container {
    background-color: #2c2c2c;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    width: 400px;
}

.score-board {
    text-align: center;
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#gameCanvas {
    border: 2px solid #444;
    border-radius: 10px;
    background-color: #222;
    max-width: 100%;
    height: auto;
    touch-action: none;
}

.controls {
    text-align: center;
    margin-top: 20px;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

#startBtn, #pauseBtn {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#startBtn:hover, #pauseBtn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

#pauseBtn {
    background-color: #2196F3;
}

#pauseBtn:hover {
    background-color: #1976D2;
}

.difficulty-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.difficulty-btn {
    padding: 8px 15px;
    font-size: 14px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.difficulty-btn:hover {
    background-color: #666;
    transform: translateY(-2px);
}

.difficulty-btn.active {
    background-color: #ff9800;
}

.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #2c2c2c;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-top: 0;
    color: #ff9800;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.modal-buttons button:first-child {
    background-color: #4CAF50;
}

.modal-buttons button:first-child:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.modal-buttons button:last-child {
    background-color: #2196F3;
}

.modal-buttons button:last-child:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
}

.score-display {
    margin-bottom: 15px;
    color: #ffd700;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.instructions {
    color: #aaa;
    margin-top: 15px;
    font-size: 14px;
}

.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #2c2c2c;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 32px;
    color: #4CAF50;
}

.modal-content p {
    font-size: 24px;
    margin: 0 0 25px 0;
}

.modal-content button {
    padding: 12px 30px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

.modal-content button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .game-container {
        padding: 15px;
    }

    .score-board {
        font-size: 24px;
    }

    .modal-content {
        padding: 20px;
        margin: 20px;
    }

    .modal-content h2 {
        font-size: 28px;
    }

    .modal-content p {
        font-size: 20px;
    }
}