/* Copyright (c) 2025. Jericho Crosby (Chalwk) */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 20px;
    text-align: center;
}

header {
    margin-bottom: 30px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

#game-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateZ(0);
}

#score {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: bold;
}

#game-area {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, #87CEEB, #E0F7FF);
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transform: translateZ(0);
    will-change: transform;
}

#player {
    position: absolute;
    bottom: 56px;
    left: 100px;
    font-size: 3rem;
    z-index: 10;
    transition: transform 0.2s ease;
    display: flex;
    align-items: flex-end;
    transform: translateZ(0);
    will-change: transform;
}

/* Jump animation */
.jumping {
    animation: jump 0.5s ease-in-out;
    will-change: transform;
}

@keyframes jump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-100px); }
    100% { transform: translateY(0); }
}

/* Crouch effect (shrinks emoji vertically) */
.crouching {
    transform: scaleY(0.6);
}

#ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to right, #8B4513, #A0522D);
    border-top: 3px solid #654321;
    z-index: 1;
}

.obstacle {
    position: absolute;
    bottom: 60px;
    font-size: 2.5rem;
    z-index: 5;
    right: -50px;
    transform: translateZ(0);
    will-change: right;
}

.obstacle.flying {
    bottom: 120px;
}

#controls {
    margin: 20px 0;
}

button {
    padding: 12px 25px;
    margin: 0 10px;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#instructions {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 1rem;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 20;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.game-over button {
    margin-top: 15px;
}

footer.meta {
    margin-top: 20px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    #game-area {
        height: 250px;
    }

    #player {
        font-size: 2.5rem;
        left: 80px;
    }

    .obstacle {
        font-size: 2rem;
    }

    button {
        padding: 10px 20px;
        font-size: 1rem;
        margin: 5px;
    }
}