#game-area {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 60vh;
    background-image: url('https://i.imgur.com/RuKOZc7.gif');
    background-size: cover;
    background-position: center;
    border: 3px solid black;
    border-radius: 0.5rem;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Game Player */
#game-player {
    position: absolute;
    bottom: 10px;
    left: 50px;
    width: 60px;
    height: 45px;
    background-color: transparent;
    background-image: url('https://i.imgur.com/Xg3I0cJ.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    will-change: bottom, left, transform, filter;
    transition: transform 0.1s ease-out, filter 0.2s ease-out, opacity 0.2s ease-out;
}

#game-player.jump {
    transform: rotate(-5deg) scaleY(0.95);
}

#game-player.invincible {
    filter: brightness(1.5) drop-shadow(0 0 8px #ffff00);
    animation: pulse 0.5s infinite alternate;
}

#game-player.slowed {
    opacity: 0.6;
    filter: grayscale(50%);
}

#game-player.hyphy-dash {
    background-image: url('https://i.imgur.com/5cfbqTU.png') !important;
    filter: none;
    animation: none;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Game Items */
.game-item {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: left;
    z-index: 5;
}

.game-obstacle {
    width: 40px;
    height: 40px;
    bottom: 10px;
}

.game-collectible {
    width: 35px;
    height: 35px;
    z-index: 6;
}

/* Obstacle Types */
.obstacle-pothole {
    height: 30px;
    bottom: 5px;
}

.obstacle-police {
    width: 65px;
    height: 40px;
}

.obstacle-oil {
    width: 50px;
    height: 20px;
    bottom: 5px;
    opacity: 0.8;
    background-image: url('https://i.imgur.com/gaMOEEF.png');
    background-size: cover;
}

.obstacle-dirtbike {
    width: 55px;
    height: 40px;
}

.obstacle-nissan {
    width: 60px;
    height: 35px;
}

/* Collectible Types */
.collectible-customer {
    width: 30px;
    height: 50px;
}

.collectible-burnout {
    width: 40px;
    height: 40px;
}

.collectible-invincible {
    width: 40px;
    height: 40px;
    background-image: url('https://i.imgur.com/3KrlRzF.png');
    animation: spin 2s linear infinite;
}

.collectible-magnet {
    width: 35px;
    height: 35px;
    background-image: url('https://i.imgur.com/Ov47NZn.png');
}

.collectible-shake {
    width: 30px;
    height: 40px;
}

/* Game Effects */
.fireball {
    position: absolute;
    width: 25px;
    height: 25px;
    background-image: url('https://i.imgur.com/f2aVTQX.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 15;
    will-change: left, top;
}

.explosion {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('https://i.imgur.com/2XFqC89.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 20;
    pointer-events: none;
}

.satisfied-customer-effect {
    position: absolute;
    width: 40px;
    height: 60px;
    background-image: url('https://i.imgur.com/FNCr0h1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 100;
    animation: fadeOutQuick 0.7s ease-out forwards;
    pointer-events: none;
}

.plus-one-effect,
.burnout-plus-one-effect {
    position: absolute;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    text-shadow: 1px 1px 1px black;
    pointer-events: none;
    z-index: 110;
    animation: fadeUp 0.6s ease-out forwards;
}

.plus-one-effect {
    color: #facc15;
}

.burnout-plus-one-effect {
    color: #ef4444;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeOutQuick {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(1.2);
    }
}

@keyframes fadeUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Game Score Area */
#game-score-area {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.1rem;
    color: white;
    text-shadow: 1px 1px 2px black;
    z-index: 100;
    font-family: 'Press Start 2P', cursive;
    background-color: rgba(0,0,0,0.3);
    padding: 5px 10px;
    border-radius: 5px;
    min-width: 150px;
}

#game-score {
    margin-bottom: 2px;
}

#high-score {
    font-size: 0.8rem;
    opacity: 0.8;
}

#combo-counter {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #facc15;
    margin-top: 4px;
}

#burnout-counter {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #ef4444;
    margin-top: 4px;
}

#delivered-counter {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #34d399;
    margin-top: 4px;
}

#powerup-indicator {
    font-size: 0.9rem;
    margin-top: 6px;
    font-weight: bold;
    text-align: center;
}

/* Game Message Overlay */
#game-message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 200;
    font-family: 'Press Start 2P', cursive;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#game-message-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Game Controls */
#game-controls-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#jump-button,
#fire-button {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

@media (min-width: 640px) {
    #jump-button,
    #fire-button {
        padding: 15px;
        font-size: 1rem;
    }
}

#jump-button {
    background-color: #fca5a5;
    border-color: #7f1d1d;
    color: #7f1d1d;
}

#jump-button:hover {
    background-color: #f87171;
}

#fire-button {
    background-color: #fdba74;
    border-color: #9a3412;
    color: #9a3412;
}

#fire-button:hover {
    background-color: #fb923c;
}

/* Particle Effect */
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: gold;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
}

.game-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid black;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.8);
    transition: all 0.1s ease-in-out;
    text-transform: uppercase;
    cursor: pointer;
    color: black;
    background-color: white;
    border-radius: 5px;
}

.close-btn:hover,
.submit-btn:hover,
.game-button:hover {
    filter: brightness(1.1);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.7);
    transform: translate(-1px, -1px);
    background-color: #eee;
}

.close-btn:active,
.submit-btn:active,
.game-button:active {
    box-shadow: 1px 1px 0px rgba(0,0,0,0.9);
    transform: translate(1px, 1px);
}

/* Compact fit for the floating "free game" window on the new site */
#game-area { aspect-ratio: 16 / 10; max-height: 340px; }
