/* CSS Reset for full-screen canvas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    position: relative;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.game-content {
    position: absolute;
    top: 10px;
    left: 10%;
    z-index: 10;
    text-align: center;
    pointer-events: none;
}

h1 {
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-size: clamp(1rem, 3vw, 1.5rem);
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.controls {
    color: white;
    margin: 5px 0;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    border-radius: 5px;
    backdrop-filter: blur(5px);
}

.desktop-controls {
    display: block;
}

.mobile-controls {
    display: none;
}

#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 50%, #000000 100%);
    margin: 0;
    padding: 0;
    border: none;
    z-index: 1;
}

/* Mobile Controls */
.mobile-controls-container {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 20;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    padding: 15px 20px;
}

.control-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.control-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.jump-btn, .action-btn {
    border-radius: 15px;
    width: 80px;
    height: 50px;
    font-size: 14px;
}

.jump-btn {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.action-btn {
    background: rgba(255, 152, 0, 0.3);
    border-color: rgba(255, 152, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-controls {
        display: none;
    }
    
    .mobile-controls {
        display: block;
    }
    
    .mobile-controls-container {
        display: flex;
    }
    
    .game-content {
        top: 5px;
    }
    
    h1 {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
        padding: 3px 10px;
    }
    
    .controls {
        font-size: clamp(0.6rem, 2.5vw, 0.8rem);
        padding: 2px 8px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-controls-container {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 10px 15px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .jump-btn, .action-btn {
        width: 65px;
        height: 40px;
        font-size: 12px;
    }
    
    h1 {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }
    
    .controls {
        font-size: clamp(0.5rem, 2vw, 0.7rem);
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .jump-btn, .action-btn {
        width: 70px;
        height: 45px;
        font-size: 12px;
    }
    
    .control-section {
        gap: 10px;
    }
    
    .mobile-controls-container {
        padding: 10px 15px;
    }
}
