/* =========================================
   Mobile Adjustments
   ========================================= */
@media (max-width: 768px) {

    /* Layout */
    .container:not(.overlay-mode) {
        display: flex;
        flex-direction: column;
        height: 100vh;
        width: 100vw;
    }

    .container:not(.overlay-mode) .panel {
        width: 100%;
        height: 50% !important;
        position: relative;
        flex: 0 0 50%;
    }

    .container.overlay-mode {
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: #000;
    }

    .container.overlay-mode .video-panel {
        position: relative;
        width: 100%;
        height: auto;
        z-index: 1;
    }

    .container.overlay-mode .player-wrapper {
        width: 100%;
        aspect-ratio: 16/9;
        position: relative;
    }

    .container.overlay-mode .camera-panel {
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        aspect-ratio: 16/9;
        transform: translateY(-50%);
        z-index: 5;
        height: auto;
        pointer-events: none;
    }

    .container.overlay-mode .camera-panel #remoteVideoContainer {
        pointer-events: auto;

    }

    /* Controls */
    .controls {
        width: 100%;
        justify-content: center;
        padding: 5px 2px;
        bottom: 0;
        gap: 1px;
        background: rgba(0, 0, 0, 0.8);
    }

    .ctrl-btn {
        padding: 0;
        width: 28px;
        height: 28px;
        min-width: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
    }

    .ctrl-btn.active {
        background: rgba(129, 140, 248, 0.2);
    }

    .btn-text {
        display: none;
    }

    /* Overlays & Settings */
    .speed-overlay {
        display: none !important;
    }

    .settings-container {
        display: block !important;
    }

    .speed-menu {
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: auto;
        min-width: 120px;
        z-index: 9999;
        background: rgba(20, 26, 58, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Sliders */
    .opacity-container,
    .sensitivity-container {
        border: none !important;
        margin-left: 2px;
        padding-left: 2px;
        width: 28px;
        height: 28px;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    .opacity-container .slider-wrapper,
    .sensitivity-container .slider-wrapper {
        position: absolute;
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
        width: 140px;
        height: 40px;
        background: rgba(0, 0, 0, 0.9);
        border-radius: 20px;
        padding: 0 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.2s ease;
        display: block;
    }

    .opacity-container.active .slider-wrapper,
    .sensitivity-container.active .slider-wrapper {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        bottom: 60px;
    }

    .slider-label {
        display: block;
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        white-space: nowrap;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
        pointer-events: none;
    }

    .search-results-grid {
        max-height: 200px;
    }
}