/* 仅保留侧滑栏独立滚动控制及浮动按钮响应式优化 */
/* 全局重置和容器样式已由 style.css 统一管理，此处不再重复 */

/* 侧滑栏完全独立滚动控制 */
.sidebar.active { pointer-events: auto; transform: translateX(0); visibility: visible; }

.sidebar.active ~ .main-content {
    pointer-events: auto;
    overflow: auto;
    position: static;
    width: 100%;
    height: auto;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.categories-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 12px 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sidebar.active .categories-container,
.sidebar.active .sidebar-content {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .sidebar.active { touch-action: pan-y; }
    
    .sidebar.active .categories-container {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }
    
    body.sidebar-open {
        overflow: auto;
        position: relative;
        width: 100%;
        height: 100%;
        touch-action: pan-y;
    }
    
    .sidebar.active ~ .main-content { touch-action: pan-y; }
}

/* 侧滑栏滚动条样式（已在 sidebar.css 中定义，此处可保留或删除，无影响） */
.categories-container::-webkit-scrollbar { width: 6px; }
.categories-container::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 3px; }
.categories-container::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 3px; transition: background 0.2s ease; }
.categories-container::-webkit-scrollbar-thumb:hover { background: #adb5bd; }

/* ====== 浮动按钮响应式优化 ====== */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 16px;
        right: 16px;
        gap: 8px;
    }
    
    .floating-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        bottom: 12px;
        right: 12px;
        gap: 6px;
    }
    
    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .floating-buttons {
        bottom: 10px;
        right: 10px;
        gap: 5px;
    }
    
    .floating-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .floating-buttons {
        bottom: 8px;
        right: 8px;
        gap: 5px;
    }
    
    .floating-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}