* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #FFB6C1 0%, #FFC0CB 50%, #FFE4E1 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(255, 182, 193, 0.4);
    text-align: center;
    max-width: 800px;
    width: 90%;
    border: 3px solid #FFB6C1;
}

.game-header h1 {
    color: #FF69B4;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3);
    font-weight: bold;
    font-family: 'Comic Sans MS', cursive;
}

.score-board {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    font-size: 1.2em;
    font-weight: bold;
    color: #FF69B4;
    background: linear-gradient(45deg, #FFE4E1, #FFF0F5);
    padding: 15px;
    border-radius: 20px;
    border: 2px solid #FFB6C1;
}

.game-area {
    position: relative;
    width: 100%;
    height: 400px;
    background: 
        /* Sky gradient */
        linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%),
        /* Jungle trees */
        radial-gradient(ellipse at 15% 60%, #228B22 0px, #228B22 40px, transparent 40px),
        radial-gradient(ellipse at 85% 50%, #228B22 0px, #228B22 35px, transparent 35px),
        radial-gradient(ellipse at 50% 70%, #228B22 0px, #228B22 45px, transparent 45px),
        /* Tree trunks */
        linear-gradient(90deg, transparent 0%, transparent 10%, #8B4513 10%, #8B4513 12%, transparent 12%, transparent 100%),
        linear-gradient(90deg, transparent 0%, transparent 80%, #8B4513 80%, #8B4513 82%, transparent 82%, transparent 100%),
        linear-gradient(90deg, transparent 0%, transparent 45%, #8B4513 45%, #8B4513 47%, transparent 47%, transparent 100%),
        /* Vines */
        linear-gradient(45deg, transparent 0%, transparent 20%, #228B22 20%, #228B22 22%, transparent 22%, transparent 100%),
        linear-gradient(-45deg, transparent 0%, transparent 70%, #228B22 70%, #228B22 72%, transparent 72%, transparent 100%),
        /* Ground */
        linear-gradient(to bottom, transparent 70%, #8B4513 70%, #A0522D 100%);
    border-radius: 25px;
    overflow: hidden;
    border: 4px solid #FFB6C1;
    margin-bottom: 20px;
    box-shadow: inset 0 0 20px rgba(255, 182, 193, 0.3);
}

/* Add jungle ground with grass */
.game-area::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: 
        /* Grass layer */
        linear-gradient(to bottom, #228B22 0px, #228B22 10px, transparent 10px),
        /* Dirt ground */
        repeating-linear-gradient(
            90deg,
            #8B4513 0px,
            #8B4513 40px,
            #A0522D 40px,
            #A0522D 80px
        );
    z-index: 1;
}

/* Add jungle decorative elements */
.game-area::after {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 5%;
    width: 80px;
    height: 60px;
    background: 
        /* Jungle flower */
        radial-gradient(circle at 50% 30%, #FF69B4 0px, #FF69B4 8px, transparent 8px),
        radial-gradient(circle at 30% 40%, #FF69B4 0px, #FF69B4 6px, transparent 6px),
        radial-gradient(circle at 70% 40%, #FF69B4 0px, #FF69B4 6px, transparent 6px),
        /* Flower center */
        radial-gradient(circle at 50% 40%, #FFD700 0px, #FFD700 4px, transparent 4px),
        /* Flower stem */
        linear-gradient(90deg, transparent 0%, transparent 48%, #228B22 48%, #228B22 52%, transparent 52%, transparent 100%);
    z-index: 2;
}

/* Pig Character */
.mario {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 0;
    left: 50px;
    background-image: url('pig.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 15;
}

.mario::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 24px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    border: 2px solid #8B4513;
}

.mario::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5px;
    width: 30px;
    height: 15px;
    background: #000080;
    border-radius: 0 0 5px 5px;
}

/* Mario's hat */
.mario .hat {
    position: absolute;
    top: -5px;
    left: 5px;
    width: 30px;
    height: 15px;
    background: #FF0000;
    border-radius: 50% 50% 0 0;
    border: 2px solid #8B0000;
}

/* Mario's overalls */
.mario .overalls {
    position: absolute;
    bottom: 15px;
    left: 5px;
    width: 30px;
    height: 20px;
    background: #000080;
    border-radius: 5px;
    border: 2px solid #000;
}

/* Coins */
.coin {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 50%;
    border: 2px solid #FFA500;
    z-index: 12;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: coinSpin 0.5s linear infinite;
}

.coin::before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFA500;
    font-weight: bold;
    font-size: 12px;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Enemies (Jungle creatures) */
.enemy {
    position: absolute;
    bottom: 0;
    width: 30px;
    height: 35px;
    background: linear-gradient(45deg, #228B22, #32CD32);
    border-radius: 50% 50% 0 0;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(34, 139, 34, 0.4);
    border: 2px solid #006400;
}

.enemy::before {
    content: '🌿';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enemy::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 5px;
    width: 20px;
    height: 10px;
    background: #32CD32;
    border-radius: 0 0 5px 5px;
}

/* Platforms (Jungle platforms) */
.platform {
    position: absolute;
    bottom: 0;
    width: 60px;
    height: 20px;
    background: linear-gradient(to bottom, #8B4513, #A0522D);
    border-radius: 10px;
    z-index: 8;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.4);
    border: 2px solid #654321;
}

.platform::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 50px;
    height: 10px;
    background: #A0522D;
    border-radius: 5px;
}

.start-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.4);
    z-index: 20;
    border: 3px solid #FFB6C1;
}

.start-screen h2 {
    color: #FF69B4;
    margin-bottom: 20px;
    font-size: 2em;
    font-family: 'Comic Sans MS', cursive;
}

.start-screen p {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #FF69B4;
    font-family: 'Comic Sans MS', cursive;
}

#startBtn {
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(255, 182, 193, 0.3);
    font-family: 'Comic Sans MS', cursive;
    border: 2px solid #FF69B4;
}

#startBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 182, 193, 0.5);
    background: linear-gradient(45deg, #FFC0CB, #FFB6C1);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.4);
    z-index: 20;
    border: 3px solid #FFB6C1;
}

.game-over h2 {
    color: #FF69B4;
    margin-bottom: 20px;
    font-size: 2em;
    font-family: 'Comic Sans MS', cursive;
}

.game-over p {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #FF69B4;
    font-family: 'Comic Sans MS', cursive;
}

#restartBtn {
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(255, 182, 193, 0.3);
    font-family: 'Comic Sans MS', cursive;
    border: 2px solid #FF69B4;
}

#restartBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 182, 193, 0.5);
    background: linear-gradient(45deg, #FFC0CB, #FFB6C1);
}

.hidden {
    display: none;
}

.game-controls {
    color: #FF69B4;
    font-size: 1.1em;
    margin-top: 20px;
    font-family: 'Comic Sans MS', cursive;
    background: linear-gradient(45deg, #FFE4E1, #FFF0F5);
    padding: 15px;
    border-radius: 20px;
    border: 2px solid #FFB6C1;
}

/* Jump animation */
@keyframes jump {
    0%, 100% { 
        bottom: 0; 
    }
    50% { 
        bottom: 200px; 
    }
}

.jumping {
    animation: jump 0.5s ease-out;
}

/* Animation for half-height jumping */
@keyframes jumpHalf {
    0%, 100% { 
        bottom: 0; 
    }
    50% { 
        bottom: 100px; 
    }
}

.jumping-half {
    animation: jumpHalf 0.3s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        width: 95%;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-area {
        height: 300px;
    }
    
    .mario {
        width: 35px;
        height: 45px;
        left: 30px;
    }
    
    .enemy {
        width: 25px;
        height: 30px;
    }
    
    .coin {
        width: 18px;
        height: 18px;
    }
} 