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

html, body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    background: #f7f7f7;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-overflow-scrolling: touch;
}

.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f7f7f7;
    touch-action: none;
}

.score-display {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .score-display {
        top: 10px;
        right: 10px;
        font-size: 14px;
        padding: 6px 10px;
    }
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    position: absolute;
    top: 0;
    left: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.game-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-controls p {
    margin-bottom: 8px;
    color: #666;
    font-size: 12px;
    margin-top: 0;
}

button {
    padding: 8px 16px;
    margin: 3px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

button:hover:not(:disabled) {
    background: #5568d3;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.game-over h2 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.game-over p {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

.hidden {
    display: none;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 600px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .game-controls {
        bottom: 10px;
        padding: 8px 12px;
    }
    
    .game-controls p {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .game-over {
        padding: 20px;
        max-width: 90%;
    }
    
    .game-over h2 {
        font-size: 20px;
    }
    
    .game-over p {
        font-size: 16px;
    }
}

.jump-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

@media (max-width: 600px) {
    .jump-button {
        bottom: 80px;
        width: 70px;
        height: 70px;
        font-size: 14px;
    }
}

.jump-button:active {
    transform: scale(0.95);
    background: #5568d3;
}

@media (min-width: 601px) {
    .jump-button {
        display: none !important;
    }
}

