* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
}

#gameCanvas {
    display: block;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.start-screen, .game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    pointer-events: all;
}

.game-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: bounce 2s infinite;
}

.game-subtitle {
    font-size: 1.2rem;
    color: #ffd700;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.game-over-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.play-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    pointer-events: all;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.play-btn:active {
    transform: translateY(0);
}

.instructions {
    margin-top: 2rem;
    text-align: center;
    opacity: 0.8;
}

.instructions p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.score-display {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.score-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.score-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.score-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
}

.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.current-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.best-score-hud {
    font-size: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none !important;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.start-screen, .game-over-screen {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive design */
@media (max-width: 480px) {
    .game-container {
        border-radius: 0;
    }
    
    #gameCanvas {
        width: 100vw;
        height: 100vh;
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .score-display {
        flex-direction: column;
        gap: 1rem;
    }
}