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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-container {
    position: relative;
    border: 4px solid #e94560;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.3);
}

#game-canvas {
    display: block;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8E8 50%, #B0E0E6 100%);
    max-width: 100%;
    touch-action: none;
}

/* Mobile Controls */
#mobile-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    z-index: 1000;
    pointer-events: none;
}

#mobile-controls.active {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.control-group {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.control-group.left {
    flex-direction: row;
}

.control-group.right {
    flex-direction: row-reverse;
}

.touch-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: transform 0.1s, background 0.1s;
}

.touch-btn:active, .touch-btn.pressed {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.5);
}

.touch-btn.jump {
    width: 90px;
    height: 90px;
    font-size: 32px;
    background: rgba(76, 175, 80, 0.4);
    border-color: rgba(76, 175, 80, 0.7);
}

.touch-btn.throw {
    width: 60px;
    height: 60px;
    font-size: 24px;
    background: rgba(139, 69, 19, 0.4);
    border-color: rgba(139, 69, 19, 0.7);
}

/* Responsive canvas scaling */
@media (max-width: 850px) {
    body {
        padding: 0;
        margin: 0;
    }
    
    #game-container {
        border: none;
        border-radius: 0;
        box-shadow: none;
        width: 100vw;
    }
    
    #game-canvas {
        width: 100vw;
        height: auto;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .touch-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .touch-btn.jump {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
    
    .touch-btn.throw {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    #mobile-controls {
        padding: 5px 15px;
    }
}
