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

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 25%, #45B7D1 50%, #96CEB4 75%, #FFEAA7 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    border: 6px solid #2C3E50;
    border-radius: 25px;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 30%, #FFF8DC 70%, #F5DEB3 100%);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
    cursor: crosshair;
    max-width: 95vw;
    max-height: 95vh;
    position: relative;
}

#gameUI {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

#scoreBoard {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    padding: 15px 20px;
    border-radius: 20px;
    box-shadow: 
        0 8px 25px rgba(255, 107, 107, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    font-weight: 600;
    color: white;
    border: 4px solid #E74C3C;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

#scoreBoard:hover {
    transform: rotate(0deg) scale(1.05);
}

#scoreBoard div {
    margin: 5px 0;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#combo {
    color: #FFD700;
    font-weight: bold;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.8);
    animation: comboGlow 0.5s ease-in-out infinite alternate;
    font-size: 1.2em;
}

@keyframes comboGlow {
    from { 
        transform: scale(1);
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.8),
            0 0 10px rgba(255, 215, 0, 0.8);
    }
    to { 
        transform: scale(1.1);
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.8),
            0 0 20px rgba(255, 215, 0, 1),
            0 0 30px rgba(255, 140, 0, 0.8);
    }
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

#powerUpTimer {
    background: linear-gradient(135deg, #FF8C00 0%, #FF4500 100%);
    padding: 12px 18px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    box-shadow: 
        0 8px 20px rgba(255, 69, 0, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    border: 3px solid #FF6347;
    animation: powerUpPulse 1s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

@keyframes powerUpPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(255, 69, 0, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 12px 30px rgba(255, 69, 0, 0.6); }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.screen-content {
    background: linear-gradient(135deg, #FFE4B5 0%, #FFF8DC 100%);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 5px solid #D2691E;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.screen-content h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    color: #E74C3C;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.screen-content p {
    font-size: 1.2rem;
    color: #2C3E50;
    margin: 15px 0;
    line-height: 1.6;
}

.instructions {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid #3498DB;
}

.instructions p {
    margin: 10px 0;
    font-size: 1rem;
}

.game-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    padding: 15px 30px;
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
    transition: all 0.3s ease;
    margin: 20px 10px;
    pointer-events: all;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(231, 76, 60, 0.6);
}

.game-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

#audioToggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid #3498DB;
    z-index: 20;
    transition: all 0.3s ease;
    pointer-events: all;
}

#audioToggle:hover {
    transform: scale(1.1);
}

.hidden {
    display: none !important;
}

/* Launch shake animation for powerful throws */
@keyframes launchShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-3px, -2px); }
    20% { transform: translate(3px, 2px); }
    30% { transform: translate(-2px, 3px); }
    40% { transform: translate(2px, -3px); }
    50% { transform: translate(-3px, 1px); }
    60% { transform: translate(3px, -1px); }
    70% { transform: translate(-1px, 3px); }
    80% { transform: translate(1px, -2px); }
    90% { transform: translate(-2px, 1px); }
}

/* Power charge effect for aiming */
@keyframes powerCharge {
    0% { 
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.4),
            inset 0 2px 10px rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.4),
            inset 0 2px 10px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 215, 0, 0.6);
    }
    100% { 
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.4),
            inset 0 2px 10px rgba(255, 255, 255, 0.3);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .screen-content h1 {
        font-size: 2rem;
    }
    
    .screen-content p {
        font-size: 1rem;
    }
    
    .game-btn {
        font-size: 1.2rem;
        padding: 12px 24px;
    }
    
    #scoreBoard {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    #scoreBoard div {
        font-size: 14px;
        margin: 3px 0;
    }
    
    #gameUI {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    #audioToggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .screen-content {
        padding: 20px;
        margin: 10px;
    }
    
    .screen-content h1 {
        font-size: 1.5rem;
    }
    
    .instructions {
        padding: 15px;
    }
    
    .instructions p {
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 0.6s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}
