/* Gradient background */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(to bottom, #4facfe, #00f2fe);
    margin: 0;
    position: relative;
}

/* Styled canvas with a patterned border */
canvas {
    border: 10px solid;
    border-image: url('https://www.toptal.com/designers/subtlepatterns/uploads/dark_embroidery.png') 20;
    background-color: lightblue;
}

/* Game Over Modal */
#gameOverModal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    display: none;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
}

#retryButton {
    padding: 10px 20px;
    font-size: 16px;
    background-color: red;
    color: white;
    border: none;
    cursor: pointer;
}

#retryButton:hover {
    background-color: darkred;
}

/* Scoreboard with better visibility */
#scoreboard {
    position: absolute;
    top: 10px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
}

/* Start message animation */
#startMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.7; }
}
