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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label {
    font-weight: bold;
    color: #667eea;
    font-size: 18px;
}

.value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

#game-area {
    width: 100%;
    flex: 1;
    background: linear-gradient(to bottom, #87ceeb 0%, #e0f6ff 100%);
    position: relative;
    overflow: hidden;
}

/* Clouds animation */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    opacity: 0.7;
    animation: moveCloud linear infinite;
    z-index: 1;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
}

.cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud::after {
    width: 60px;
    height: 60px;
    top: -30px;
    right: 10px;
}

@keyframes moveCloud {
    from {
        transform: translateX(-200px);
    }
    to {
        transform: translateX(calc(100vw + 200px));
    }
}

#player {
    width: 80px;
    height: 80px;
    background: #ff6b6b;
    border-radius: 10px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.1s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

#player::before {
    content: '🧺';
}

.falling-object {
    width: 50px;
    height: 50px;
    position: absolute;
    top: -100px;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fall linear;
    z-index: 5;
}

@keyframes fall {
    to {
        transform: translateY(calc(100vh - 60px));
    }
}

.falling-object.good::before {
    content: '🎁';
}

.falling-object.bad::before {
    content: '💣';
}

#start-screen, #game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

#start-screen h1 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 32px;
}

#start-screen p, #game-over p {
    margin: 10px 0;
    color: #555;
    font-size: 16px;
}

#game-over h2 {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 36px;
}

#game-over p {
    font-size: 20px;
    margin-bottom: 20px;
}

#final-score {
    color: #667eea;
    font-weight: bold;
    font-size: 28px;
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(0);
}

button.secondary-btn {
    background: #6c757d;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
    margin-left: 10px;
}

button.secondary-btn:hover {
    background: #5a6268;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

.hidden {
    display: none;
}

/* Pulse animation for lives when hit */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); color: #ff6b6b; }
}

.pulse {
    animation: pulse 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }
    
    .label {
        font-size: 14px;
    }
    
    .value {
        font-size: 18px;
    }
    
    #player {
        width: 60px;
        height: 60px;
        font-size: 30px;
        bottom: 15px;
    }
    
    .falling-object {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
    
    #start-screen, #game-over {
        padding: 30px 20px;
        width: 90%;
        max-width: 400px;
    }
    
    #start-screen h1 {
        font-size: 24px;
    }
    
    #start-screen p, #game-over p {
        font-size: 14px;
    }
    
    #game-over h2 {
        font-size: 28px;
    }
    
    button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 8px 10px;
    }
    
    .stat {
        gap: 5px;
    }
    
    .label {
        font-size: 12px;
    }
    
    .value {
        font-size: 16px;
    }
    
    #player {
        width: 50px;
        height: 50px;
        font-size: 25px;
        bottom: 10px;
    }
    
    .falling-object {
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
    
    #start-screen h1 {
        font-size: 20px;
    }
    
    #game-over h2 {
        font-size: 24px;
    }
    
    #final-score {
        font-size: 24px;
    }
}

/* Prevent text selection and touch callouts on mobile */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Improve touch targets */
button {
    min-height: 44px;
    min-width: 44px;
}