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

body {
    background: linear-gradient(to bottom, #87ceeb 0%, #e0f6ff 100%);
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    background: #87ceeb;
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 10;
}

#score {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

#trick-display {
    font-size: 48px;
    font-weight: bold;
    color: #ffff00;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    min-height: 60px;
    animation: pulse 0.3s ease-in-out;
}

#controls {
    font-size: 14px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
}

#controls p {
    margin: 5px 0;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Mobile controls */
.mobile-only {
    display: none;
}

#mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 100;
    pointer-events: none;
}

#mobile-controls * {
    pointer-events: auto;
}

.control-btn {
    font-family: Arial, sans-serif;
    font-weight: bold;
    border: 3px solid #333;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.05s ease-out, box-shadow 0.05s ease-out, opacity 0.05s ease-out;
}

.control-btn:active {
    transform: scale(0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    opacity: 0.8;
}

.jump-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 100px;
    height: 100px;
    font-size: 16px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-radius: 50%;
}

.trick-buttons {
    position: absolute;
    bottom: 30px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trick-btn {
    width: 140px;
    height: 50px;
    font-size: 14px;
    color: white;
}

#btn-kickflip {
    background: linear-gradient(135deg, #FF6B4A, #E64A2E);
}

#btn-popshuvit {
    background: linear-gradient(135deg, #4A7BA7, #2E5F8C);
}

#btn-impossible {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
}

/* Mobile-specific styles */
@media (max-width: 1024px), (max-height: 600px), (pointer: coarse) {
    .mobile-only {
        display: block !important;
    }
    
    #controls {
        display: none;
    }
    
    #score {
        font-size: 24px;
    }
    
    #trick-display {
        font-size: 32px;
    }
    
    #ui {
        top: 10px;
        left: 10px;
    }
    
    #gameCanvas {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
}

/* Phone-specific styles */
@media (max-width: 767px) {
    body {
        align-items: flex-start;
        padding-top: 0;
        overflow: hidden;
    }
    
    #game-container {
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
    }
    
    #gameCanvas {
        display: block;
        margin: 0 auto;
    }
    
    #ui {
        top: 8px;
        left: 8px;
    }
    
    #score {
        font-size: 16px;
    }
    
    #trick-display {
        font-size: 20px;
    }
    
    .jump-btn {
        width: 70px;
        height: 70px;
        font-size: 12px;
        bottom: 10px;
        right: 12px;
    }
    
    .trick-buttons {
        bottom: 10px;
        left: 8px;
    }
    
    .trick-btn {
        width: 105px;
        height: 38px;
        font-size: 10px;
        margin-bottom: 5px;
    }
}
