/* Touch Controls - Dual Knob System */

.touch-controls-container {
    position: fixed;
    bottom: 80px; /* Moved higher to avoid Celeste (which is at bottom: -2px) */
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 20px;
    pointer-events: none;
    z-index: 1000;
    --knob-size: 100px;
}

.touch-knob-container {
    position: relative;
    width: var(--knob-size);
    height: var(--knob-size);
    pointer-events: auto;
    touch-action: none;
    user-select: none;
}

.touch-knob-base {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease;
}

.touch-knob-container.active .touch-knob-base {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.touch-knob-handle {
    position: absolute;
    width: 30%;
    height: 30%;
    top: 50%;
    left: 50%;
    margin-top: -15%;
    margin-left: -15%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease-out, background 0.2s ease;
    pointer-events: none;
}

.touch-knob-container.active .touch-knob-handle {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Dead zone indicator (optional - can be enabled for debugging) */
.touch-knob-base::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(var(--knob-size) * 0.3);
    height: calc(var(--knob-size) * 0.3);
    margin-top: calc(var(--knob-size) * -0.15);
    margin-left: calc(var(--knob-size) * -0.15);
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.touch-knob-container.active .touch-knob-base::before {
    opacity: 1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .touch-controls-container {
        padding: 0 15px;
        bottom: 15px;
    }
    
    .touch-knob-container {
        --knob-size: 90px;
    }
}

@media (max-width: 480px) {
    .touch-controls-container {
        padding: 0 10px;
        bottom: 10px;
    }
    
    .touch-knob-container {
        --knob-size: 80px;
    }
}

/* Let JS control visibility.
   Note: many hybrid devices (e.g. Windows touch laptops) report (hover:hover) and
   (pointer:fine) even though touch is available, so we avoid forcing `display:none !important`. */

