* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    padding: 0;
    margin: 0;
}

#gameContainer {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    max-width: 100vw;
    max-height: 100vh;
}

#gameCanvas {
    display: block;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #90EE90 100%);
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

#score {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-weight: bold;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

#instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
}

#instructions h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

#instructions p {
    margin: 10px 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 40px 60px;
    border-radius: 20px;
    color: white;
    display: none;
    pointer-events: all;
}

#gameOver h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

#gameOver p {
    font-size: 24px;
    margin: 15px 0;
}

#gameOver button {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#gameOver button:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    #gameContainer {
        border-radius: 0;
        box-shadow: none;
        width: 100vw;
        height: 100vh;
    }

    #gameCanvas {
        border-radius: 0;
    }

    #score {
        font-size: 32px;
        top: 10px;
    }

    #instructions {
        font-size: 16px;
        padding: 0 20px;
    }

    #instructions h2 {
        font-size: 32px;
    }

    #gameOver {
        padding: 30px 40px;
    }

    #gameOver h2 {
        font-size: 32px;
    }

    #gameOver p {
        font-size: 18px;
    }

    #gameOver button {
        font-size: 18px;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    #score {
        font-size: 28px;
        top: 8px;
    }

    #instructions {
        font-size: 14px;
    }

    #instructions h2 {
        font-size: 28px;
    }

    #gameOver {
        padding: 20px 30px;
    }

    #gameOver h2 {
        font-size: 28px;
    }

    #gameOver p {
        font-size: 16px;
    }

    #gameOver button {
        font-size: 16px;
        padding: 10px 25px;
    }
}
